/* =========================================
   DEVICE FRAMES — shared phone mockups
   ========================================= */

.phone-frame {
  --phone-bezel: 12px;
  --phone-radius: 36px;
  --phone-chassis: #5c5c7f;
  --phone-edge: #5b5b78;

  position: relative;
  flex-shrink: 0;
  width: 184px;
  height: 376px;
  padding: var(--phone-bezel);
  border-radius: var(--phone-radius);
  background:
    linear-gradient(145deg, #58586d 0%, var(--phone-chassis) 18%, #0d0d12 100%);
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.28),
    0 10px 28px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -2px 0 rgba(0, 0, 0, 0.45);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

/* Side buttons */
.phone-frame::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 88px;
  width: 3px;
  height: 54px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #5a5a68, #2a2a34);
  box-shadow: 0 68px 0 #2a2a34;
  pointer-events: none;
}

/* Dynamic Island */
.phone-frame::before {
  content: '';
  position: absolute;
  top: calc(var(--phone-bezel) + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 14px;
  background: #050508;
  border-radius: 999px;
  z-index: 3;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.phone-frame__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--phone-radius) - var(--phone-bezel) - 2px);
  overflow: hidden;
  background: #000;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* --- Sizes --- */
.phone-frame--sm {
  --phone-bezel: 9px;
  --phone-radius: 28px;
  width: 148px;
  height: 304px;
}

.phone-frame--sm::before {
  width: 48px;
  height: 11px;
  top: calc(var(--phone-bezel) + 6px);
}

.phone-frame--md {
  --phone-bezel: 11px;
  --phone-radius: 34px;
  width: 176px;
  height: 360px;
}

.phone-frame--lg {
  --phone-bezel: 12px;
  --phone-radius: 36px;
  width: 188px;
  height: 384px;
}

/* --- Tilt + motion variants --- */
.phone-frame--tilt-left {
  transform: translateY(20px) rotate(-4deg);
}

.phone-frame--tilt-right {
  transform: translateY(0) rotate(3deg);
}

.phone-frame--float-1 {
  animation: phoneFrameFloat1 5s ease-in-out infinite;
}

.phone-frame--float-2 {
  animation: phoneFrameFloat2 5s ease-in-out infinite 1s;
}

@keyframes phoneFrameFloat1 {
  0%, 100% { transform: translateY(20px) rotate(-4deg); }
  50%      { transform: translateY(8px) rotate(-4deg); }
}

@keyframes phoneFrameFloat2 {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50%      { transform: translateY(-12px) rotate(3deg); }
}

/* --- Group layout (side-by-side phones) --- */
.phone-frame-group {
  display: flex;
  gap: var(--sp-6);
  align-items: flex-end;
  justify-content: center;
}

.phone-frame:hover {
  box-shadow:
    0 44px 104px rgba(0, 0, 0, 0.32),
    0 12px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -2px 0 rgba(0, 0, 0, 0.45);
}

@media (max-width: 900px) {
  .phone-frame-group {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .phone-frame--md {
    width: 148px;
    height: 304px;
  }

  .phone-frame--lg {
    width: 156px;
    height: 320px;
  }

  .phone-frame-group {
    gap: 12px;
  }
}

@media (max-width: 360px) {
  .phone-frame--sm,
  .phone-frame--md {
    width: 132px;
    height: 272px;
  }

  .phone-frame--lg {
    width: 140px;
    height: 288px;
  }
}
