/* OPTICAL PRISM HEROS — the original opening artwork becomes the permanent identity.
   Uses the same prism / light elements and material as the original introduction.
   All artwork is clipped to existing rounded hero frames; no external asset or WebGL. */

/* The original abyssal black and cobalt atmosphere, instead of the alley illustration. */
#view-home .hero,
#view-about > .tab-head,
#view-credentials > .tab-head,
#view-projects > .tab-head,
#view-kaisei > .tab-head,
#view-contact > .tab-head,
body[data-page="project"] .case-banner {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background-color:#02050e !important;
  background-image:radial-gradient(ellipse 65% 76% at 66% 44%,rgba(13,41,123,.22),transparent 82%) !important;
  background-size:cover !important;
  background-position:center !important;
  border-color:rgba(134,171,237,.26) !important;
  box-shadow:inset 0 1px 0 rgba(172,207,255,.1),0 30px 90px rgba(0,4,18,.4) !important;
}

/* The shared framing and diagonal optical light are pixel-consistent with the previous entry. */
.prism-stage {
  position:absolute !important;
  z-index:0 !important;
  display:block;
  inset:0;
  width:100%;
  height:100%;
  margin:0;
  padding:0;
  pointer-events:none;
  user-select:none;
  overflow:hidden;
  border-radius:inherit;
  background:radial-gradient(ellipse 65% 76% at 66% 44%,rgba(13,41,123,.22),transparent 82%),#02050e;
}
.prism-stage::before {
  content:"";
  position:absolute;z-index:0;inset:0;opacity:.45;pointer-events:none;
  background:linear-gradient(rgba(114,153,253,.065) 1px,transparent 1px),linear-gradient(90deg,rgba(114,153,253,.046) 1px,transparent 1px);
  background-size:clamp(48px,6.2vw,100px) clamp(48px,6.2vw,100px);
  -webkit-mask-image:radial-gradient(ellipse 83% 83% at 62% 50%,black,transparent);
  mask-image:radial-gradient(ellipse 83% 83% at 62% 50%,black,transparent);
}
.prism-stage::after {
  content:"";position:absolute;z-index:2;left:-40%;right:-40%;top:42%;height:1px;pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(77,148,255,.35),rgba(163,207,255,.85),rgba(77,148,255,.35),transparent);
  transform:rotate(-20deg);box-shadow:0 0 28px rgba(13,100,255,.42);opacity:.65;
}
.prism-stage > .entry-cinema__light {
  position:absolute;
  z-index:0;
  pointer-events:none;
  inset:-35% -6% -35% 0;
  background:
    radial-gradient(ellipse 30% 52% at 76% 48%,rgba(8,85,255,.42),transparent 76%),
    radial-gradient(ellipse 21% 42% at 78% 53%,rgba(85,180,255,.25),transparent 74%);
  filter:blur(33px);
  animation:entryLightBreath 6.5s ease-in-out infinite alternate;
}
.prism-stage > .entry-cinema__shards {
  position:absolute;
  z-index:1;
  right:-6%;
  top:2%;
  bottom:0;
  width:min(70vw,1030px);
  transform:perspective(1300px) rotate(-17deg) skewY(4deg);
  transform-origin:50% 50%;
  opacity:.98;
  pointer-events:none;
}
.prism-stage .entry-cinema__shard {
  animation:none !important;
  opacity:1;
  filter:none;
}
.prism-stage .entry-cinema__shard:nth-child(1){opacity:.48;}
.prism-stage .entry-cinema__shard:nth-child(2){opacity:.75;}
.prism-stage .entry-cinema__shard:nth-child(3){opacity:1;}
.prism-stage .entry-cinema__shard:nth-child(4){opacity:.45;}
.prism-stage > .entry-cinema__shards::after {animation:none !important;opacity:1;}

/* HOME: keep monumental PORTfolio / silhouette readable while swapping the atmosphere. */
#view-home .hero > .prism-stage {z-index:1 !important;}
#view-home .hero > .hero-cinema {opacity:0 !important;visibility:hidden !important;}
#view-home .hero::before {
  z-index:3 !important;
  background:linear-gradient(90deg,rgba(1,5,16,.38),rgba(1,7,20,.07) 55%,rgba(2,5,15,.10)),
             linear-gradient(180deg,rgba(2,5,15,.08) 0%,transparent 44%,rgba(1,5,17,.5) 100%) !important;
}
#view-home .hero::after {opacity:0 !important;}
#view-home .hero-grid {position:relative;z-index:7 !important;}

/* INNER HEROES: the first child is decoration, all copy stays higher in the stack. */
#view-about > .tab-head > .prism-stage,
#view-credentials > .tab-head > .prism-stage,
#view-projects > .tab-head > .prism-stage,
#view-kaisei > .tab-head > .prism-stage,
#view-contact > .tab-head > .prism-stage {
  position:absolute !important;
  z-index:0 !important;
  inset:0 !important;
  transform:none !important;
}
#view-about > .tab-head > div:not(.prism-stage),
#view-credentials > .tab-head > div:not(.prism-stage),
#view-projects > .tab-head > div:not(.prism-stage),
#view-kaisei > .tab-head > div:not(.prism-stage),
#view-contact > .tab-head > div:not(.prism-stage) {
  position:relative;
  z-index:3 !important;
}
#view-about > .tab-head::before,
#view-credentials > .tab-head::before,
#view-projects > .tab-head::before,
#view-kaisei > .tab-head::before,
#view-contact > .tab-head::before {opacity:0 !important;}
:is(#view-about,#view-credentials,#view-projects,#view-kaisei,#view-contact) > .tab-head h1,
:is(#view-about,#view-credentials,#view-projects,#view-kaisei,#view-contact) > .tab-head p {
  text-shadow:0 6px 26px rgba(0,4,24,.5);
}

/* Project detail: the exact same optical staging extends to case-study covers. */
body[data-page="project"] .case-banner > .prism-stage {z-index:0 !important;}
body[data-page="project"] .case-banner > :not(.prism-stage):not(.orb) {
  position:relative;
  z-index:3 !important;
}
body[data-page="project"] .case-banner > .orb {opacity:.13;}
body[data-page="project"] .case-banner::before {
  content:"";position:absolute;z-index:1;inset:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(0,4,16,.42),rgba(0,5,20,.08) 65%,rgba(0,4,15,.1));
}

/* At smaller widths we keep the same material, shifting its crystal stage. */
@media(max-width:960px){
  .prism-stage > .entry-cinema__shards {right:-28%;width:100vw;opacity:.75;}
}
@media(max-width:600px){
  .prism-stage > .entry-cinema__shards {right:-75%;top:-9%;width:145vw;opacity:.62;}
  .prism-stage > .entry-cinema__light {right:-80%;}
  #view-home .hero::before {background:linear-gradient(180deg,rgba(1,5,17,.13),transparent 39%,rgba(1,5,15,.46) 100%) !important;}
}
@media(prefers-reduced-motion:reduce){
  .prism-stage *{animation:none!important;}
}
