@import url("./tianji-home-opening.css?v=20260924-1");

/* The existing homepage moves below a fixed, non-interactive character layer. */
#tianji-opening-canvas {
  position: fixed;
  left: 50%;
  top: 54%;
  width: min(70vw, 1040px);
  height: auto;
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
  will-change: opacity;
}

#tianji-opening-close {
  position: fixed;
  top: 102px;
  right: clamp(16px, 4vw, 64px);
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 15px 0 11px;
  border: 1px solid rgba(255, 255, 255, .56);
  border-radius: 999px;
  background: rgba(23, 37, 31, .82);
  color: #fff;
  font: 500 14px/1 sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#tianji-opening-close:hover { background: #17251f; }
#tianji-opening-close:focus-visible {
  outline: 3px solid #c6ec50;
  outline-offset: 3px;
}
.tianji-opening-close-icon { font-size: 26px; font-weight: 300; line-height: .7; }

.hero h1,
.hero .tianji-opening-compact,
.manifesto h2,
.section-head h2,
.watercolor-caption h2,
.closing h2 {
  scale: var(--tianji-avoid-scale, 1);
  transform-origin: left top;
  transition: scale .42s cubic-bezier(.22, 1, .36, 1);
}

/* When there is too little room to shrink legibly, the letters pass in front
   of the figures instead of disappearing beneath them. */
.tianji-heading-front {
  position: relative;
  z-index: 9;
  text-shadow: 0 1px 8px #f3ecdc, 0 0 15px #f3ecdc;
}
.hero .hero-copy.tianji-copy-front { z-index: 9; }
.tianji-heading-shell-front { position: relative; z-index: 9; }
.hero .tianji-heading-front,
.solutions .tianji-heading-front,
.watercolor-window .tianji-heading-front,
.closing .tianji-heading-front {
  text-shadow: 0 2px 10px #17251f, 0 0 18px #17251f;
}

@media (min-width: 651px) {
  .hero-copy > p { max-width: 360px; }
  .festival-blessing {
    width: min(360px, calc(100vw - 48px));
    height: 160px;
  }
}

@media (max-width: 650px) {
  #tianji-opening-close {
    top: 76px;
    right: 12px;
    min-width: 44px;
    padding: 0;
    justify-content: center;
  }
  .tianji-opening-close-label { display: none; }
  #tianji-opening-canvas {
    width: 100vw;
    max-width: none;
    left: 50%;
    top: 51%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #tianji-opening-canvas { display: none; }
}
