<style>
/* /css/netstudio-phones.css (Internalized & Scaled Down) */

.ns-phone-section {
  padding: 56px 0;
  overflow: hidden;
  background: #000;
}

.iphone-frame {
  position: absolute;
  /* The width is controlled by the stack variables below */
  width: var(--phone-w);
  aspect-ratio: 390 / 844;
  transform-origin: center;
  will-change: transform;
}

.phone-inner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.phone-black-fill {
  position: absolute;
  left: 4%;
  top: 2.5%;
  width: 92%;
  height: 95%;
  background: #000;
  border-radius: 14% / 7%;
  z-index: 0;
}

.phone-screen {
  position: absolute;
  left: 9.7%;
  top: 7.2%;
  width: 80.6%;
  height: 85.9%;
  overflow: hidden;
  border-radius: 8.8% / 4.2%;
  background: #000;
  z-index: 1;
}

.phone-screen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.phone-bezel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(3.11);
  transform-origin: center;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

/* THREE PHONES */
.phone-stack {
  --phone-w: 115px; /* Scaled down from 132px */
  --center-scale: 1.23;
  position: relative;
  width: min(118vw, 760px);
  height: 330px; /* Scaled down from 380px */
  left: 50%;
  transform: translateX(-50%);
  margin: 0 auto;
}

.phone-left {
  left: 50%;
  top: 46px;
  z-index: 2;
  transform: translateX(-118%) rotate(-6deg);
}

.phone-center {
  left: 50%;
  top: 6px;
  z-index: 5;
  transform: translateX(-50%) scale(var(--center-scale));
}

.phone-right {
  left: 50%;
  top: 46px;
  z-index: 2;
  transform: translateX(18%) rotate(6deg);
}

/* TWO PHONES — NOT TOUCHING */
.two-phone-stack {
  --phone-w: 145px; /* Scaled down from 170px */
  position: relative;
  width: 420px;
  height: 365px; /* Scaled down from 430px */
  margin: 0 auto;
}

.two-phone-left {
  left: 28px;
  top: 12px;
  z-index: 2;
  transform: rotate(-3deg);
}

.two-phone-right {
  right: 28px;
  top: 12px;
  z-index: 2;
  transform: rotate(3deg);
}

/* SINGLE PHONE */
.single-phone-stack {
  --phone-w: 145px; /* Scaled down from 170px */
  position: relative;
  width: 100%;
  height: 365px; /* Scaled down from 430px */
  margin: 0 auto;
}

.single-phone {
  left: 50%;
  top: 12px;
  z-index: 2;
  transform: translateX(-50%);
}

/* MOBILE */
@media(max-width: 520px) {
  .phone-stack {
    --phone-w: 105px; /* Scaled down from 122px */
    width: 122vw;
    height: 290px; /* Scaled down from 340px */
  }

  .phone-center {
    top: 8px;
  }

  .phone-left,
  .phone-right {
    top: 44px;
  }

  .two-phone-stack {
    --phone-w: 130px; /* Scaled down from 152px */
    width: 340px;
    height: 335px; /* Scaled down from 390px */
  }

  .single-phone-stack {
    --phone-w: 130px; /* Scaled down from 152px */
    height: 335px; /* Scaled down from 390px */
  }
}
</style>
