/* Per-essay overlay for "Jaki interes ma AGI?" (ARG Explains 05).
   Base layout, palette, callouts, and shared keyframes come from
   ../ailectricity/style.css. This file adds:
   - Hero SVG classes for pot-and-lid scenario diagram
   - Custom keyframes: steamRise, potShimmer, flameFlicker
   - Content blocks: opening-note, conflict-stack, branch-stack,
     sources-block, series-note
*/

/* ---------- Opening note (editorial intro) ---------- */
.interest-content .opening-note {
  margin: 0 0 2.4rem;
  padding: 0.9rem 1.2rem;
  border-left: 2px solid rgba(99, 214, 198, 0.46);
  background: rgba(99, 214, 198, 0.04);
  color: rgba(236, 232, 220, 0.78);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.94rem;
  font-style: italic;
  line-height: 1.6;
}

/* ---------- Conflict stack ("Model, który woli...") ---------- */
.interest-content .conflict-stack {
  display: grid;
  gap: 0.5rem;
  margin: 1.8rem 0;
  padding: 1.1rem 1.3rem;
  border-left: 3px solid rgba(210, 99, 92, 0.62);
  background:
    linear-gradient(90deg, rgba(210, 99, 92, 0.06), transparent),
    rgba(13, 16, 22, 0.6);
}

.interest-content .conflict-stack p {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.96rem;
  line-height: 1.55;
}

/* ---------- Branch stack (Guard scenarios) ---------- */
.interest-content .branch-stack {
  display: grid;
  gap: 0.55rem;
  margin: 1.9rem 0;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(212, 182, 111, 0.24);
  background:
    linear-gradient(90deg, rgba(212, 182, 111, 0.08), transparent 60%),
    rgba(13, 16, 22, 0.66);
}

.interest-content .branch-stack p {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.6rem;
  align-items: baseline;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.97rem;
  line-height: 1.55;
}

.interest-content .branch-arrow {
  color: rgba(212, 182, 111, 0.92);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
}

/* ---------- Series note (italicized series tag) ---------- */
.interest-content .series-note {
  color: rgba(170, 164, 146, 0.78);
  font-size: 0.92rem;
  text-align: center;
  margin: 2.4rem 0 1.4rem;
}

/* ---------- Sources block (Zenodo + org link) ---------- */
.interest-content .sources-block {
  margin: 1.8rem 0 0;
  padding: 1.4rem 1.5rem;
  border-top: 1px solid rgba(214, 199, 150, 0.18);
  color: var(--muted, #aaa492);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
}

.interest-content .sources-block > p:first-child {
  margin: 0 0 0.85rem;
  color: var(--gold, #d4b66f);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.interest-content .sources-block ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.interest-content .sources-block li {
  margin-bottom: 0.5rem;
}

.interest-content .sources-block a {
  color: rgba(99, 214, 198, 0.92);
  text-decoration: none;
  border-bottom: 1px dotted rgba(99, 214, 198, 0.45);
}

.interest-content .sources-block a:hover,
.interest-content .sources-block a:focus-visible {
  color: #63d6c6;
  border-bottom-color: rgba(99, 214, 198, 0.85);
  outline: none;
}

.interest-content .sources-block__org {
  margin: 1.1rem 0 0;
  font-size: 0.82rem;
  color: var(--soft, #777264);
}

/* ====================================================
   INTEREST-GRAPHIC — hero SVG: pot, lid, scenarios, steam
   ==================================================== */

.interest-graphic .grid-line {
  stroke: rgba(214, 199, 150, 0.05);
}

/* ---------- Gradient descent axis (left) ---------- */
.interest-graphic .gd-curve {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 6 5;
  opacity: 0.85;
  animation: lineFlow 5.4s linear infinite;
}

.interest-graphic .gd-label {
  fill: rgba(170, 164, 146, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-anchor: start;
}

.interest-graphic .gd-label--strong {
  fill: rgba(99, 214, 198, 0.92);
  font-weight: 600;
}

/* ---------- Operator node (top) ---------- */
.interest-graphic .operator-node circle {
  fill: rgba(9, 13, 18, 0.82);
  stroke: rgba(106, 143, 220, 0.7);
  stroke-width: 1.5;
  animation: nodeBreathe 4.6s ease-in-out infinite;
}

.interest-graphic .operator-node text {
  fill: rgba(236, 232, 220, 0.88);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-anchor: middle;
}

.interest-graphic .operator-node text:last-child {
  fill: rgba(170, 184, 220, 0.72);
  font-size: 9.5px;
}

/* ---------- Operator → Guard line ---------- */
.interest-graphic .operator-line {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 5 4;
  opacity: 0.82;
  animation: lineFlow 3.6s linear infinite;
}

/* ---------- Steam particles ---------- */
.interest-graphic .steam {
  fill: rgba(99, 214, 198, 0.55);
}

.interest-graphic .steam--1 { animation: steamRise 3.4s ease-in-out infinite; }
.interest-graphic .steam--2 { animation: steamRise 4.1s ease-in-out infinite; animation-delay: -0.6s; }
.interest-graphic .steam--3 { animation: steamRise 3.7s ease-in-out infinite; animation-delay: -1.2s; }
.interest-graphic .steam--4 { animation: steamRise 4.5s ease-in-out infinite; animation-delay: -1.8s; }
.interest-graphic .steam--5 { animation: steamRise 3.9s ease-in-out infinite; animation-delay: -2.4s; }
.interest-graphic .steam--6 { animation: steamRise 4.2s ease-in-out infinite; animation-delay: -0.9s; }

@keyframes steamRise {
  0% { transform: translateY(0); opacity: 0.78; }
  40% { opacity: 0.55; }
  100% { transform: translateY(-36px); opacity: 0; }
}

/* ---------- Pot lid (GUARD layer) ---------- */
.interest-graphic .lid-shape {
  fill: rgba(212, 182, 111, 0.10);
  stroke: rgba(212, 182, 111, 0.78);
  stroke-width: 1.6;
}

.interest-graphic .lid-handle {
  fill: none;
  stroke: rgba(212, 182, 111, 0.78);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.interest-graphic .lid-label {
  fill: rgba(212, 182, 111, 0.92);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-anchor: middle;
}

/* ---------- Pot body + glow ---------- */
.interest-graphic .pot-shell {
  fill: rgba(13, 16, 22, 0.62);
  stroke: rgba(214, 199, 150, 0.34);
  stroke-width: 1.4;
}

.interest-graphic .pot-glow {
  fill: url(#potGlow);
  opacity: 0.65;
  animation: potShimmer 5.2s ease-in-out infinite;
}

@keyframes potShimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

/* ---------- Scenario bands (3 layers) ---------- */
.interest-graphic .scenario-band {
  stroke-width: 1.2;
}

.interest-graphic .scenario-band--1 {
  fill: rgba(106, 143, 220, 0.07);
  stroke: rgba(106, 143, 220, 0.44);
}

.interest-graphic .scenario-band--2 {
  fill: rgba(212, 182, 111, 0.12);
  stroke: rgba(212, 182, 111, 0.58);
}

.interest-graphic .scenario-band--3 {
  fill: rgba(99, 214, 198, 0.07);
  stroke: rgba(99, 214, 198, 0.44);
}

.interest-graphic .band-num {
  fill: rgba(170, 164, 146, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-anchor: start;
}

.interest-graphic .band-num--1 { fill: rgba(170, 184, 220, 0.82); }
.interest-graphic .band-num--2 { fill: rgba(212, 182, 111, 0.92); }
.interest-graphic .band-num--3 { fill: rgba(99, 214, 198, 0.82); }

.interest-graphic .band-text {
  fill: rgba(236, 232, 220, 0.84);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-anchor: middle;
}

.interest-graphic .band-text--strong {
  fill: rgba(212, 182, 111, 0.96);
  font-weight: 600;
}

/* ---------- Agent pulse (inside Pseudo-interests band) ---------- */
.interest-graphic .agent-pulse circle {
  fill: rgba(212, 182, 111, 0.32);
  stroke: rgba(212, 182, 111, 0.86);
  stroke-width: 1.4;
  animation: nodeBreathe 3.4s ease-in-out infinite;
}

/* ---------- Flame (bottom, under pot) ---------- */
.interest-graphic .flame-shape {
  fill: rgba(210, 99, 92, 0.42);
  stroke: rgba(212, 182, 111, 0.65);
  stroke-width: 1.2;
  stroke-linejoin: round;
  animation: flameFlicker 1.8s ease-in-out infinite;
}

.interest-graphic .flame-shape--inner {
  fill: rgba(212, 182, 111, 0.85);
  stroke: none;
  animation-duration: 1.2s;
  animation-delay: -0.3s;
}

@keyframes flameFlicker {
  0%, 100% { opacity: 0.78; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
}

.interest-graphic .flame-label {
  fill: rgba(170, 164, 146, 0.68);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-anchor: middle;
}

/* ---------- Caption ---------- */
.interest-graphic .caption {
  fill: rgba(170, 164, 146, 0.78);
  text-anchor: start;
  font-style: italic;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 720px) {
  .interest-content .branch-stack p {
    grid-template-columns: 1.1rem 1fr;
    gap: 0.4rem;
    font-size: 0.92rem;
  }
}
