/* ============================================================
   Section-Specific Styles — Per-journey accents and overrides
   ============================================================ */

/* ---- Journey Section Accent Colors ---- */

.journey--defend { --section-accent: #4a90d9; }  /* Blue — night/ice */
.journey--dig    { --section-accent: #d4a03c; }  /* Gold — resources */
.journey--explore { --section-accent: #6c5ce7; } /* Purple — space */
.journey--trade  { --section-accent: #2ecc71; }  /* Green — money */
.journey--fight  { --section-accent: #e74c3c; }  /* Red — combat */
.journey--battle { --section-accent: #e67e22; }  /* Orange — fire */

/* Apply accent to section elements */
.journey .journey__detail::before {
  background: var(--section-accent, var(--color-accent));
  box-shadow: 0 0 8px var(--section-accent, var(--color-accent));
}

/* Divider accent color applied via style.css using --section-accent */

.journey .stat-counter__number {
  color: var(--color-gold);
}

/* ---- Journey Section Subtle Backgrounds ---- */

.journey--defend {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(74, 144, 217, 0.02) 50%,
    transparent 100%
  );
}

.journey--dig {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(212, 160, 60, 0.02) 50%,
    transparent 100%
  );
}

.journey--explore {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(108, 92, 231, 0.02) 50%,
    transparent 100%
  );
}

.journey--trade {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(46, 204, 113, 0.02) 50%,
    transparent 100%
  );
}

.journey--fight {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(231, 76, 60, 0.02) 50%,
    transparent 100%
  );
}

.journey--battle {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(230, 126, 34, 0.02) 50%,
    transparent 100%
  );
}

/* ---- Premise Section ---- */

.premise {
  position: relative;
}

.premise::after {
  content: '';
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 60px;
  background:
    radial-gradient(circle 4px at 50% 50%,
      var(--color-accent-dim) 0%, transparent 100%),
    radial-gradient(ellipse 60px 30px at 50% 50%,
      rgba(180, 168, 255, 0.1) 0%, transparent 100%),
    linear-gradient(90deg, transparent 10%, rgba(180, 168, 255, 0.2) 45%, transparent 49%)
      center / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 51%, rgba(180, 168, 255, 0.2) 55%, transparent 90%)
      center / 100% 1px no-repeat;
  pointer-events: none;
}

/* ---- Connected Section Node Indexing ---- */

.connected__loop-node:nth-child(1) { --node-index: 0; }
.connected__loop-node:nth-child(2) { --node-index: 1; }
.connected__loop-node:nth-child(3) { --node-index: 2; }
.connected__loop-node:nth-child(4) { --node-index: 3; }
.connected__loop-node:nth-child(5) { --node-index: 4; }
.connected__loop-node:nth-child(6) { --node-index: 5; }
.connected__loop-node:nth-child(7) { --node-index: 6; }

/* ---- Gallery Section — Empty State ---- */

.gallery__grid:empty::after {
  content: 'Screenshots coming soon';
  display: block;
  padding: 3rem;
  color: var(--color-text-dim);
  font-style: italic;
  font-size: 0.9rem;
  grid-column: 1 / -1;
  text-align: center;
}

/* ---- Screenshot Placeholder State ---- */

.journey__screenshot[style*="display: none"] + .journey__screenshot[style*="display: none"] + .journey__screenshot[style*="display: none"] + .journey__screenshot[style*="display: none"] {
  display: none;
}

/* When all screenshots are hidden, show a placeholder in the media area */
.journey__screenshots:empty,
.journey__screenshots:not(:has(img:not([style*="display: none"]))) {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(108, 92, 231, 0.1);
  border-radius: 6px;
  background: var(--color-bg-elevated);
}

.journey__screenshots:not(:has(img:not([style*="display: none"])))::after {
  content: 'Screenshots coming soon';
  color: var(--color-text-dim);
  font-size: 0.8rem;
  font-style: italic;
  opacity: 0.5;
}

/* Video placeholder when missing */
.journey__video[style*="display: none"] ~ .journey__screenshots {
  grid-template-columns: 1fr 1fr;
}
