/* UPLINK-Toyama / five-scene WebGL opening film */
.toyama-film-canvas{
  position:absolute;
  z-index:1;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  opacity:0;
  pointer-events:none;
  background:#04151c;
  transition:opacity .7s cubic-bezier(.16,1,.3,1);
}
.hero-v4.toyama-film-ready .toyama-film-canvas{opacity:1}
.hero-v4.toyama-film-ready .uplink-webgl-scene{display:none}
.hero-v4.toyama-film-ready>picture{opacity:0;visibility:hidden}

.hero-v4.toyama-film-ready::before{
  z-index:2!important;
  background:
    linear-gradient(90deg,rgba(0,10,16,.68),rgba(0,12,18,.18) 43%,rgba(0,12,18,.02) 72%),
    linear-gradient(0deg,rgba(0,9,15,.46),transparent 55%)!important;
}

.hero-v4.toyama-film-ready .toyama-journey-ui{z-index:4}
.hero-v4.toyama-film-ready .hero-master-grid{z-index:5}
.hero-v4.toyama-film-ready .hero-field-dock{z-index:7}
.hero-v4.toyama-film-ready .toyama-opening-chapters{display:none}

.toyama-film-label{
  position:absolute;
  left:clamp(1.5rem,6vw,8rem);
  bottom:clamp(8rem,13vh,10.5rem);
  display:grid;
  grid-template-columns:auto 1fr;
  gap:clamp(.8rem,1.6vw,1.5rem);
  align-items:start;
  width:min(42rem,53vw);
  color:#fff;
  text-shadow:0 .6rem 2.8rem rgba(0,5,12,.84);
}
.toyama-film-label>b{color:#baffea;font:500 clamp(3rem,5.4vw,6.2rem)/.82 ui-monospace,monospace;letter-spacing:-.1em}
.toyama-film-label>span{display:grid;gap:.18rem}
.toyama-film-label em{font-size:clamp(.72rem,1vw,.92rem);font-style:normal;font-weight:700;letter-spacing:.13em}
.toyama-film-label strong{font-size:clamp(2.4rem,4.7vw,5.5rem);font-weight:500;line-height:.92;letter-spacing:-.065em;white-space:nowrap}
.toyama-film-label small{margin-top:.55rem;color:rgba(239,255,251,.76);font:650 .58rem/1 ui-monospace,monospace;letter-spacing:.16em}
.toyama-film-label.is-changing{animation:film-label-in .58s cubic-bezier(.16,1,.3,1) both}
@keyframes film-label-in{0%{opacity:0;filter:blur(8px);transform:translateY(1.1rem)}100%{opacity:1;filter:none;transform:none}}

.hero-v4[data-toyama-phase="4"] .toyama-journey-stop:nth-child(4),
.hero-v4[data-toyama-phase="5"] .toyama-journey-stop:nth-child(5){opacity:1;transform:translateX(0)}
.hero-v4[data-toyama-phase="4"] .toyama-journey-stop:nth-child(4)::before,
.hero-v4[data-toyama-phase="5"] .toyama-journey-stop:nth-child(5)::before{
  background:#c9ffef;
  box-shadow:0 0 1.15rem rgba(139,255,224,.9),0 0 0 .24rem rgba(7,32,42,.4);
  transform:scale(1.08);
}

.hero-v4.toyama-film-ready .opening-chapter{
  top:auto;
  right:auto;
  bottom:clamp(7.9rem,12vh,10rem);
  left:clamp(1.5rem,6vw,8rem);
  width:min(39rem,48vw);
  transform:translate3d(0,1.2rem,0) scale(.97)!important;
}
.hero-v4.toyama-film-ready[data-toyama-phase="1"] .opening-chapter-1,
.hero-v4.toyama-film-ready[data-toyama-phase="2"] .opening-chapter-2,
.hero-v4.toyama-film-ready[data-toyama-phase="3"] .opening-chapter-3,
.hero-v4.toyama-film-ready[data-toyama-phase="4"] .opening-chapter-4,
.hero-v4.toyama-film-ready[data-toyama-phase="5"] .opening-chapter-5{
  opacity:1!important;
  filter:none!important;
  transform:translate3d(0,0,0) scale(1)!important;
}
.hero-v4.toyama-film-ready[data-toyama-phase="5"] .toyama-film-label{opacity:.16;transform:translateY(-1rem) scale(.88);transform-origin:left bottom;transition:opacity .8s,transform 1s}

.hero-v4.toyama-film-ready:not([data-toyama-phase="5"]) .hero-v4-copy,
.hero-v4.toyama-film-ready:not([data-toyama-phase="5"]) .hero-now{
  opacity:0!important;
  filter:blur(9px)!important;
  transform:translate3d(0,2rem,0) scale(.97)!important;
  pointer-events:none;
}
.hero-v4.toyama-film-ready[data-toyama-phase="5"] .opening-chapter-5{
  opacity:.16!important;
  transform:translate3d(0,-1.5rem,0) scale(.86)!important;
}
.hero-v4.toyama-film-ready[data-toyama-phase="5"] .hero-v4-copy,
.hero-v4.toyama-film-ready[data-toyama-phase="5"] .hero-now{
  opacity:1!important;
  filter:none!important;
  transform:none!important;
}

.toyama-opening-skip{
  position:absolute;
  z-index:9;
  right:clamp(1.2rem,3vw,3.7rem);
  bottom:clamp(4.8rem,7vw,7.5rem);
  display:none;
  padding:.62rem .9rem;
  border:1px solid rgba(230,255,249,.26);
  border-radius:999px;
  color:rgba(244,255,252,.78);
  background:rgba(0,20,27,.38);
  backdrop-filter:blur(14px);
  font:700 .55rem/1 ui-monospace,SFMono-Regular,Consolas,monospace;
  letter-spacing:.12em;
  cursor:pointer;
  transition:color .25s,border-color .25s,background .25s;
}
.toyama-film-ready .toyama-opening-skip{display:block}
.toyama-opening-skip:hover,.toyama-opening-skip:focus-visible{color:#071b1f;border-color:#baffea;background:#baffea}
.hero-v4[data-toyama-phase="5"] .toyama-opening-skip{opacity:0;pointer-events:none}

@media(max-width:900px){
  .hero-v4.toyama-film-ready .opening-chapter{width:min(34rem,64vw)}
}

@media(max-width:700px){
  .hero-v4.toyama-film-ready::before{
    background:linear-gradient(180deg,rgba(0,12,18,.04),rgba(0,12,18,.16) 43%,rgba(0,11,17,.76) 78%,#06151c)!important;
  }
  .hero-v4.toyama-film-ready .opening-chapter{left:1.25rem;right:auto;bottom:8.25rem;width:calc(100vw - 2.5rem)}
  .toyama-film-label{left:1.25rem;top:60svh;bottom:auto;width:calc(100vw - 2.5rem);gap:.7rem}
  .toyama-opening-altitude{top:55svh}
  .toyama-film-label>b{font-size:2.55rem}.toyama-film-label strong{font-size:clamp(2.05rem,10.7vw,3.25rem);white-space:normal}
  .toyama-opening-skip{right:1.1rem;top:calc(100svh - 4rem);bottom:auto;padding:.72rem .88rem;background:rgba(0,20,27,.64)}
  .hero-v4[data-toyama-phase="5"] .toyama-film-label,
  .hero-v4[data-toyama-phase="5"] .toyama-opening-altitude{display:none}
  .hero-v4.toyama-film-ready:not([data-toyama-phase="5"]) .hero-master-grid{min-height:100svh}
}

@media(prefers-reduced-motion:reduce){
  .toyama-film-canvas,.toyama-opening-skip{display:none!important}
}
