/* Layout and visual treatment. Typography lives in brand.css. */

.royal-device-pair {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1400px;
  --rp: var(--p,0);
}
.royal-browser {
  position: absolute;
  left: 0;
  top: 10%;
  width: 92%;
  z-index: 2;
  transform: translate3d(0,calc(var(--rp)*-18px),0) rotateY(calc(-7deg + var(--rp)*9deg));
  transform-origin: center;
  overflow: hidden;
}
.royal-desktop-view {
  position: relative;
  width: 100%;
  aspect-ratio: 1.44;
  background: #1b1b19;
  overflow: hidden;
}
.royal-desktop-view>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.royal-desktop-view iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 1440px;
  height: 1000px;
  border: 0;
  transform: scale(var(--royal-scale,1));
  transform-origin: 0 0;
  pointer-events: none;
  opacity: 0;
}
.royal-desktop-view.preview-ready iframe {
  opacity: 1;
}
.royal-screen-link {
  position: absolute;
  inset: 0;
  z-index: 3;
}
.royal-phone {
  position: absolute;
  right: -1%;
  top: 38%;
  width: 28%;
  z-index: 4;
  transform: translate3d(0,calc(var(--rp)*-28px),60px) rotateZ(4deg);
  border-width: 5px;
  border-radius: 24px;
  display: block;
}
.royal-phone img {
  width: 100%;
  height: auto;
}
.royal-project {
  background: #211e18;
  color: #eeeae1;
}
.royal-project .project-stage {
  background: #211e18;
}
.royal-project .project-copy>p:not(.eyebrow) {
  color: #bbb3a6;
}
.royal-project .project-composition {
  height: 70%;
  max-height: 630px;
}
.project-royal {
  background: #29251e;
  min-height: 130svh;
}
.project-royal .project-visual {
  width: 88%;
  height: auto;
  aspect-ratio: 1.3;
  padding: 0;
  margin: 0 auto;
}
.project-royal .royal-device-pair {
  --rp: var(--scene-p,0);
}
.project-royal .royal-browser {
  top: 0;
}
.project-royal .royal-phone {
  top: auto;
  bottom: -2%;
  width: 25%;
}
.project-royal .project-context {
  margin-top: 38px;
}
.royal-screen-link:focus-visible,.royal-phone:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.no-motion .royal-browser,.no-motion .royal-phone {
  transform: none !important;
}

@media (max-width:760px) {
.royal-project .project-copy {
  padding-top: 95px;
}
.royal-project .project-copy h2 {
  max-width: 100%;
}
.royal-project .project-composition {
  height: 340px;
  max-height: none;
  margin-top: 30px;
  width: 100%;
}
.royal-project .project-stage {
  min-height: 850px;
}
.royal-project .royal-browser {
  top: 0;
  width: 96%;
  left: 0;
  transform: translateY(calc(var(--rp)*-7px));
}
.royal-phone {
  width: 34%;
  top: 38%;
  right: 0;
  border-width: 3px;
  border-radius: 17px;
  transform: translateY(calc(var(--rp)*-12px)) rotateZ(3deg);
}
.royal-device-pair .browser-bar {
  height: 19px;
  padding-inline: 7px;
}
.project-royal {
  min-height: 0;
}
.project-royal .project-visual {
  width: 100%;
  aspect-ratio: auto;
  height: 340px;
  padding: 0;
}
.project-royal .royal-browser {
  width: 96%;
  top: 0;
  transform: translateY(calc(var(--rp)*-7px));
}
.project-royal .royal-phone {
  width: 34%;
  top: 37%;
  bottom: auto;
  right: 0;
}
.project-royal .project-context {
  margin-top: 15px;
}
}

@media (prefers-reduced-motion:reduce) {
.royal-browser,.royal-phone {
  transform: none !important;
}
.royal-desktop-view iframe {
  display: none;
}
.royal-desktop-view>img {
  display: block;
}
}
