/* UPLINK-Toyama / semantic depth journey */
.uplink-webgl-scene{
  position:absolute;
  z-index:0;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  opacity:0;
  background:#061520;
  pointer-events:none;
  transition:opacity .7s cubic-bezier(.16,1,.3,1);
}

.hero-v4.webgl-150-ready .uplink-webgl-scene{opacity:1}
.hero-v4.webgl-150-ready picture{opacity:0;visibility:hidden}
.hero-v4 picture{transition:opacity .7s ease}

/* All previous floating geometry is intentionally removed from the experience */
.uplink-v8.field-home .hero-depth-architecture,
.uplink-v8.field-home .toyama-sculpture{display:none!important}

.toyama-journey-ui{
  --journey-progress:0;
  position:absolute;
  z-index:4;
  inset:0;
  color:#f5fffc;
  pointer-events:none;
}

.toyama-journey-rail{
  position:absolute;
  top:50%;
  right:clamp(1rem,2.4vw,2.4rem);
  display:grid;
  gap:1.05rem;
  width:8.7rem;
  transform:translateY(-50%);
}

.toyama-journey-rail::before{
  content:"";
  position:absolute;
  top:.34rem;
  bottom:.34rem;
  left:.28rem;
  width:1px;
  background:rgba(238,255,250,.3);
}

.toyama-journey-rail::after{
  content:"";
  position:absolute;
  top:.34rem;
  left:.28rem;
  width:1px;
  height:calc((100% - .68rem) * var(--journey-progress));
  background:#d5fff3;
  box-shadow:0 0 1.4rem rgba(139,255,224,.88);
  transition:height .18s linear;
}

.toyama-journey-stop{
  position:relative;
  display:grid;
  gap:.22rem;
  min-height:2.55rem;
  padding-left:1.25rem;
  opacity:.34;
  transform:translateX(.3rem);
  transition:opacity .65s cubic-bezier(.16,1,.3,1),transform .65s cubic-bezier(.16,1,.3,1);
}

.toyama-journey-stop::before{
  content:"";
  position:absolute;
  z-index:2;
  top:.22rem;
  left:0;
  width:.58rem;
  aspect-ratio:1;
  border:1px solid rgba(235,255,250,.72);
  border-radius:50%;
  background:#07202a;
  box-shadow:0 0 0 .22rem rgba(7,32,42,.34);
  transition:background .5s,box-shadow .5s,transform .5s;
}

.toyama-journey-stop b{
  font:700 .57rem/1.1 ui-monospace,SFMono-Regular,Consolas,monospace;
  letter-spacing:.16em;
}

.toyama-journey-stop span{
  color:rgba(236,255,250,.82);
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.05em;
}

.hero-v4[data-toyama-phase="1"] .toyama-journey-stop:nth-child(1),
.hero-v4[data-toyama-phase="2"] .toyama-journey-stop:nth-child(2),
.hero-v4[data-toyama-phase="3"] .toyama-journey-stop:nth-child(3),
.hero-v4[data-toyama-phase="4"] .toyama-journey-stop:nth-child(4){
  opacity:1;
  transform:translateX(0);
}

.hero-v4[data-toyama-phase="1"] .toyama-journey-stop:nth-child(1)::before,
.hero-v4[data-toyama-phase="2"] .toyama-journey-stop:nth-child(2)::before,
.hero-v4[data-toyama-phase="3"] .toyama-journey-stop:nth-child(3)::before,
.hero-v4[data-toyama-phase="4"] .toyama-journey-stop:nth-child(4)::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);
}

.toyama-journey-caption{
  position:absolute;
  right:clamp(1.25rem,3vw,3.6rem);
  bottom:clamp(1rem,2.2vw,2.3rem);
  display:flex;
  align-items:center;
  gap:.8rem;
  color:rgba(240,255,252,.72);
  font:650 .57rem/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;
  letter-spacing:.14em;
}

.toyama-journey-caption::before{
  content:"";
  width:clamp(2rem,5vw,5.5rem);
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(220,255,247,.8));
}

/* Opening film language — information moves with the actual Toyama route */
.toyama-opening-status{
  position:absolute;
  top:clamp(6.6rem,11vh,8.6rem);
  left:clamp(1.25rem,3vw,3.75rem);
  display:flex;
  align-items:center;
  gap:.72rem;
  color:rgba(245,255,252,.88);
  font:700 .58rem/1 ui-monospace,SFMono-Regular,Consolas,monospace;
  letter-spacing:.16em;
}
.opening-status-mark{
  width:.48rem;
  aspect-ratio:1;
  border-radius:50%;
  background:#baffea;
  box-shadow:0 0 1.25rem #7fffd8;
  animation:opening-pulse 1.8s ease-in-out infinite;
}
.opening-status-time{padding-left:.72rem;border-left:1px solid rgba(234,255,249,.34);color:#baffea}

.toyama-opening-chapters{
  position:absolute;
  z-index:4;
  inset:0;
  overflow:hidden;
}
.opening-chapter{
  position:absolute;
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-areas:"no over" "no title" "no meta";
  column-gap:1rem;
  width:min(34rem,42vw);
  color:#f6fffc;
  opacity:0;
  filter:blur(10px);
  transform:translate3d(0,2rem,0) scale(.96);
  transition:opacity .85s cubic-bezier(.16,1,.3,1),transform 1.1s cubic-bezier(.16,1,.3,1),filter .85s;
  text-shadow:0 .45rem 2.5rem rgba(0,10,18,.68);
}
.opening-chapter>b{grid-area:no;align-self:start;color:#baffea;font:500 clamp(2.5rem,5vw,5.8rem)/.83 ui-monospace,monospace;letter-spacing:-.1em}
.opening-chapter em{grid-area:over;margin-bottom:.2rem;font-size:clamp(.7rem,.9vw,.9rem);font-style:normal;font-weight:700;letter-spacing:.13em}
.opening-chapter strong{grid-area:title;font-size:clamp(2rem,4vw,5rem);font-weight:500;line-height:.92;letter-spacing:-.065em;white-space:nowrap}
.opening-chapter small{grid-area:meta;margin-top:.7rem;font:650 .58rem/1 ui-monospace,monospace;letter-spacing:.16em;color:rgba(240,255,251,.72)}
.opening-chapter-1{left:clamp(1.5rem,6vw,8rem);bottom:clamp(8rem,15vh,11rem)}
.opening-chapter-2{left:52%;top:23%;transform:translate3d(-50%,2rem,0) scale(.96)}
.opening-chapter-3{right:clamp(6rem,10vw,12rem);top:18%;text-align:left}
.opening-chapter-4{right:clamp(6rem,10vw,12rem);top:18%;text-align:left}
.hero-v4[data-toyama-phase="1"] .opening-chapter-1,
.hero-v4[data-toyama-phase="2"] .opening-chapter-2,
.hero-v4[data-toyama-phase="3"] .opening-chapter-3,
.hero-v4[data-toyama-phase="4"] .opening-chapter-4{
  opacity:1;
  filter:blur(0);
  transform:translate3d(0,0,0) scale(1);
}
.hero-v4[data-toyama-phase="2"] .opening-chapter-2{transform:translate3d(-50%,0,0) scale(1)}

.toyama-cultural-portal{
  position:absolute;
  z-index:3;
  left:50%;
  top:50%;
  display:grid;
  grid-template-columns:repeat(3,minmax(8rem,1fr));
  gap:clamp(1rem,3vw,3.25rem);
  width:min(72rem,78vw);
  padding:clamp(1rem,2vw,2rem);
  border-block:1px solid rgba(225,255,248,.22);
  background:linear-gradient(90deg,transparent,rgba(1,18,25,.78) 13%,rgba(1,18,25,.78) 87%,transparent);
  opacity:0;
  filter:blur(18px);
  transform:translate3d(-50%,-40%,0) perspective(1000px) rotateX(16deg) scale(.84);
  transition:opacity .9s,filter 1s,transform 1.25s cubic-bezier(.16,1,.3,1);
}
.hero-v4[data-toyama-phase="3"] .toyama-cultural-portal{opacity:1;filter:none;transform:translate3d(-50%,-50%,0) perspective(1000px) rotateX(0) scale(1)}
.culture-symbol{display:grid;grid-template-rows:minmax(9rem,22vh) auto;gap:.65rem;margin:0;color:#effff9;text-align:center}
.culture-symbol svg{width:100%;height:100%;overflow:visible;fill:none;stroke:#e8fff9;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 .75rem rgba(125,255,220,.38))}
.culture-symbol .culture-detail{stroke:rgba(143,236,255,.38);stroke-width:.7;stroke-dasharray:3 6}
.culture-symbol figcaption{display:grid;gap:.22rem}
.culture-symbol b{font-size:clamp(1rem,1.35vw,1.28rem);letter-spacing:.06em;text-shadow:0 2px 18px #001018}
.culture-symbol small{font:650 .5rem/1 ui-monospace,monospace;letter-spacing:.16em;color:#a9f3df}
.hero-v4[data-toyama-phase="3"] .culture-symbol svg{animation:culture-draw 2.2s cubic-bezier(.16,1,.3,1) both}
.culture-zuiryuji svg{animation-delay:.1s!important}.culture-owara svg{animation-delay:.2s!important}
.culture-route-note{position:absolute;right:1.2rem;bottom:-1.4rem;color:rgba(232,255,249,.66);font:650 .52rem/1 ui-monospace,monospace;letter-spacing:.15em}
.culture-route-note span{margin-left:1rem;color:#fff}

.toyama-opening-altitude{
  position:absolute;
  left:clamp(1.25rem,3vw,3.75rem);
  right:clamp(1.25rem,3vw,3.75rem);
  bottom:clamp(1.15rem,2.4vw,2.7rem);
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:1rem;
  color:rgba(240,255,251,.72);
  font:650 .55rem/1 ui-monospace,SFMono-Regular,Consolas,monospace;
  letter-spacing:.14em;
}
.toyama-opening-altitude span{display:flex;gap:.42rem}.toyama-opening-altitude b{color:#fff}
.toyama-opening-altitude i{position:relative;height:1px;background:rgba(235,255,249,.24)}
.toyama-opening-altitude i::after{
  content:"";
  position:absolute;
  inset:-1px auto auto 0;
  width:calc(var(--journey-progress) * 100%);
  height:3px;
  background:linear-gradient(90deg,#7ce9ff,#baffea,#fff0ae);
  box-shadow:0 0 1.2rem rgba(157,255,229,.7);
  transition:width .15s linear;
}

.hero-v4.toyama-journey-ready .hero-v4-copy,
.hero-v4.toyama-journey-ready .hero-now{
  transition:opacity 1s cubic-bezier(.16,1,.3,1),transform 1.25s cubic-bezier(.16,1,.3,1),filter 1s;
}
.hero-v4.toyama-journey-ready:not([data-toyama-phase="4"]) .hero-v4-copy,
.hero-v4.toyama-journey-ready:not([data-toyama-phase="4"]) .hero-now{
  opacity:0;
  filter:blur(8px);
  transform:translate3d(0,2rem,0) scale(.97);
  pointer-events:none;
}
.hero-v4.toyama-journey-ready[data-toyama-phase="4"] .opening-chapter-4{opacity:.2;transform:translate3d(0,-1.5rem,0) scale(.86)}
.hero-v4.toyama-journey-ready[data-toyama-phase="4"] .hero-v4-copy,
.hero-v4.toyama-journey-ready[data-toyama-phase="4"] .hero-now{opacity:1;filter:none;transform:none}

@keyframes opening-pulse{50%{opacity:.35;transform:scale(.72)}}
@keyframes culture-draw{0%{opacity:0;stroke-dasharray:1 700;stroke-dashoffset:700;transform:translateY(1.2rem)}100%{opacity:1;stroke-dasharray:700 1;stroke-dashoffset:0;transform:none}}

.uplink-v8.field-home .hero-v4>.hero-master-grid{position:relative;z-index:5}
.uplink-v8.field-home .hero-v4::before{z-index:2;pointer-events:none}
.uplink-v8.field-home .hero-v4.webgl-150-ready::before{
  background:
    linear-gradient(90deg,rgba(0,12,20,.88) 0%,rgba(0,17,24,.55) 34%,rgba(0,13,20,.03) 61%,rgba(0,12,19,.08) 100%),
    linear-gradient(0deg,rgba(0,11,18,.5),transparent 54%)!important;
}

.hero-v4.webgl-spatial-ready{background:#061520!important}
.hero-v4.webgl-spatial-ready .hero-now{
  background:linear-gradient(145deg,rgba(2,20,29,.79),rgba(4,28,35,.48));
  box-shadow:0 2rem 8rem rgba(0,0,0,.42),inset 0 1px rgba(255,255,255,.15);
}
.hero-v4.webgl-spatial-ready .hero-kicker{
  border-color:rgba(207,255,243,.36);
  background:rgba(2,24,30,.5);
  backdrop-filter:blur(14px);
}
.hero-v4.webgl-spatial-ready .hero-v4-copy h1{text-shadow:0 1.5rem 4rem rgba(0,0,0,.45)}

@media(max-width:1100px){
  .toyama-journey-rail{display:none}
  .opening-chapter{width:min(31rem,55vw)}
}

@media(max-width:900px){
  .toyama-journey-caption{display:none}
  .uplink-v8.field-home .hero-v4.webgl-150-ready::before{
    background:linear-gradient(180deg,rgba(1,15,21,.05),rgba(1,17,23,.48) 48%,#07171b 100%)!important;
  }
  .opening-chapter-3,.opening-chapter-4{right:2rem}
  .toyama-cultural-portal{width:90vw;gap:1rem}
}

@media(max-width:700px){
  .uplink-webgl-scene{filter:saturate(.97)}
  .hero-v4.webgl-spatial-ready .hero-now{backdrop-filter:blur(16px) saturate(120%)}
  .toyama-opening-status{top:6.6rem;left:1.25rem}
  .toyama-opening-chapters{height:62svh}
  .opening-chapter{width:calc(100vw - 2.5rem);left:1.25rem;right:auto;top:auto;bottom:3.5rem;transform:translate3d(0,1.5rem,0) scale(.97)}
  .opening-chapter>b{font-size:2.35rem}
  .opening-chapter strong{font-size:clamp(2.15rem,11vw,3.2rem);white-space:normal}
  .hero-v4[data-toyama-phase="2"] .opening-chapter-2{transform:translate3d(0,0,0) scale(1)}
  .toyama-opening-altitude{top:61svh;bottom:auto;left:1.25rem;right:1.25rem}
  .toyama-cultural-portal{top:37%;grid-template-columns:repeat(3,1fr);width:calc(100vw - 1.5rem);padding:.75rem .35rem}
  .culture-symbol{grid-template-rows:8rem auto}.culture-symbol b{font-size:.68rem}.culture-symbol small,.culture-route-note{display:none}
  .hero-v4.toyama-journey-ready:not([data-toyama-phase="4"]) .hero-master-grid{min-height:100svh}
}

@media(max-width:360px){
  html,body{max-width:100%;overflow-x:clip}
  .skip-link{position:fixed!important;z-index:200!important;top:0!important;left:.5rem!important;transform:translateY(-150%)!important}
  .skip-link:focus{transform:translateY(.5rem)!important}
  .uplink-v8 .site-header{position:absolute!important;inset:.45rem .45rem auto!important;width:auto!important;max-width:none!important}
  .uplink-v8 .site-header .nav-wrap{display:flex!important;width:100%!important;max-width:none!important;align-items:center!important;justify-content:space-between!important;padding:.7rem .85rem!important;box-sizing:border-box!important}
  .uplink-v8 .site-header .logo{display:flex!important;width:auto!important;flex:0 1 auto!important}
  .uplink-v8 .site-header .logo>span,.uplink-v8 .site-header .logo em{width:auto!important}
  .uplink-v8 .site-header .menu-button{width:3rem!important;height:3rem!important;flex:0 0 3rem!important;margin-left:auto!important}
  .uplink-v8 .site-header nav{width:0!important;height:0!important;overflow:visible!important}
  html.has-js .uplink-v8 .site-header .nav-list{width:100vw!important;min-width:0!important;max-width:100vw!important}
  html.has-js .uplink-v8 .site-header .nav-list li,
  html.has-js .uplink-v8 .site-header .nav-list a{width:100%!important;max-width:100%!important;box-sizing:border-box!important}
  .uplink-v8 .hero-master-grid{width:100%!important;max-width:100%!important;box-sizing:border-box!important}
}

@media(prefers-reduced-motion:reduce){
  .uplink-webgl-scene,.toyama-journey-ui{display:none}
  .hero-v4.webgl-150-ready picture{opacity:1;visibility:visible}
}

@media(forced-colors:active){
  .uplink-webgl-scene,.toyama-journey-ui{display:none!important}
  .hero-v4.webgl-150-ready picture{opacity:1!important;visibility:visible!important}
}
