/* Patron Mobile — premium device mockups (theme-aware) */

/* --- Phone (iPhone-style thin bezel) --- */
.device-phone {
  position: relative;
  margin: 0;
  border-radius: 2.35rem;
  padding: 0.35rem;
  background: var(--device-rim-shine), var(--device-rim);
  border: 1px solid var(--device-rim-border);
  box-shadow:
    var(--device-inner-shadow),
    var(--device-shadow);
}

.device-phone__inner {
  position: relative;
  border-radius: 2.05rem;
  overflow: hidden;
  background: var(--device-screen-bg);
}

.device-phone__dynamic {
  position: absolute;
  top: 0.55rem;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  max-width: 6.5rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--device-dynamic-bg);
  z-index: 2;
  box-shadow: 0 0 0 1px var(--color-border);
}

.device-phone__screen {
  position: relative;
  aspect-ratio: 393 / 844;
  width: 100%;
  max-height: 100%;
  border-radius: 1.85rem;
  overflow: hidden;
  background: var(--device-screen-bg);
}

.device-phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.device-phone--tilt-left {
  transform: rotate(-6deg) translateY(0.5rem);
}

.device-phone--tilt-right {
  transform: rotate(5deg) translateY(0.75rem);
}

.device-phone--hero {
  width: min(11.5rem, 42vw);
}

.device-phone--thumb .device-phone__screen {
  aspect-ratio: 390 / 844;
}

.device-phone--thumb {
  width: 100%;
  max-width: 7.5rem;
  margin-inline: auto;
  border-radius: 1.35rem;
  padding: 0.2rem;
}

.device-phone--thumb .device-phone__dynamic {
  width: 32%;
  height: 0.55rem;
  top: 0.35rem;
}

.device-phone--thumb .device-phone__screen {
  border-radius: 1.1rem;
}

/* --- Desktop (iMac-style premium) --- */
.device-desktop {
  position: relative;
  margin: 0;
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 0.55rem 0.55rem 0.4rem;
  background: var(--desktop-shell-shine), var(--desktop-shell);
  border: 1px solid var(--desktop-bezel);
  box-shadow: var(--desktop-inner-shadow), var(--desktop-shadow);
  isolation: isolate;
}

.device-desktop::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--desktop-highlight);
  border-radius: 0.75rem 0.75rem 0 0;
  pointer-events: none;
  z-index: 3;
}

.device-desktop__camera {
  position: absolute;
  top: 0.35rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--device-camera-bg);
  border: 1px solid var(--device-camera-border);
  z-index: 4;
}

.device-desktop__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 0.25rem;
  overflow: hidden;
  background: var(--desktop-screen-well);
  border: 1px solid var(--desktop-screen-frame);
  box-shadow: var(--desktop-screen-inset);
  z-index: 1;
}

.device-desktop__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: var(--desktop-screen-image-filter, none);
}

.device-desktop__chin {
  height: 0.4rem;
  margin-top: 0.15rem;
  border-radius: 0 0 0.25rem 0.25rem;
  background: var(--desktop-chin);
}

.device-desktop__stand {
  width: 36%;
  max-width: 6.5rem;
  height: 3.5rem;
  margin: 0 auto;
  margin-top: -1px;
  background: var(--desktop-stand);
  border-radius: 0 0 0.25rem 0.25rem;
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
}

.device-desktop__base {
  width: 52%;
  max-width: 11rem;
  height: 0.45rem;
  margin: 0 auto;
  margin-top: -0.05rem;
  border-radius: 0.35rem;
  background: var(--desktop-base);
  box-shadow: var(--desktop-contact-shadow);
}

.device-desktop--hero .device-desktop__screen {
  aspect-ratio: 16 / 9;
}

.device-desktop--card {
  max-width: 11rem;
  margin-inline: auto;
  border-radius: 0.55rem 0.55rem 0 0;
  padding: 0.3rem 0.3rem 0.2rem;
}

.device-desktop--card .device-desktop__stand {
  height: 2rem;
  max-width: 4.5rem;
}

.device-desktop--card .device-desktop__base {
  max-width: 7rem;
}

.device-desktop--showcase {
  width: 100%;
}

/* --- Hero scene composition --- */
.hero-scene {
  position: relative;
  min-height: 20rem;
  display: grid;
  place-items: center;
  padding-block: var(--space-8);
}

.hero-scene__glow {
  position: absolute;
  inset: 10% 5%;
  background: radial-gradient(
    ellipse at calc(50% + var(--glow-x, 0px)) calc(30% + var(--glow-y, 0px)),
    var(--color-accent-glow), transparent 55%
  );
  pointer-events: none;
  z-index: 0;
  animation: hero-glow-drift 8s ease-in-out infinite alternate;
}

.hero-scene__desktop {
  position: relative;
  z-index: 1;
  width: min(100%, 36rem);
  transform: perspective(1400px) rotateY(-8deg) rotateX(3deg);
  animation: hero-float 6s ease-in-out infinite alternate;
}

.hero-scene__phones {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-inline: clamp(0.5rem, 4vw, 2.5rem);
  padding-bottom: var(--space-4);
  gap: var(--space-2);
  z-index: 2;
  pointer-events: none;
}

.hero-scene__phones .device-phone {
  pointer-events: auto;
}

.hero-scene__phones .device-phone--tilt-left {
  animation: hero-phone-left 7s ease-in-out 0.5s infinite alternate;
}

.hero-scene__phones .device-phone--tilt-right {
  animation: hero-phone-right 7s ease-in-out 1.5s infinite alternate;
}

@keyframes hero-float {
  from { transform: perspective(1400px) rotateY(-8deg) rotateX(3deg) translateY(0); }
  to   { transform: perspective(1400px) rotateY(-8deg) rotateX(3deg) translateY(-6px); }
}

@keyframes hero-phone-left {
  from { transform: rotate(-6deg) translateY(0.5rem); }
  to   { transform: rotate(-6deg) translateY(calc(0.5rem - 5px)); }
}

@keyframes hero-phone-right {
  from { transform: rotate(5deg) translateY(0.75rem); }
  to   { transform: rotate(5deg) translateY(calc(0.75rem - 5px)); }
}

@keyframes hero-glow-drift {
  from { opacity: 0.7; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.04); }
}

@media (max-width: 47.99rem) {
  .hero-scene__desktop {
    animation-duration: 8s;
  }
  .hero-scene__phones .device-phone--tilt-left,
  .hero-scene__phones .device-phone--tilt-right {
    animation-duration: 9s;
  }
  @keyframes hero-float {
    from { transform: perspective(1400px) rotateY(-8deg) rotateX(3deg) translateY(0); }
    to   { transform: perspective(1400px) rotateY(-8deg) rotateX(3deg) translateY(-3px); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scene__glow,
  .hero-scene__desktop,
  .hero-scene__phones .device-phone--tilt-left,
  .hero-scene__phones .device-phone--tilt-right {
    animation: none !important;
  }

  .hero-scene__glow {
    opacity: 0.85;
    transform: none;
  }

  .hero-scene__desktop {
    transform: perspective(1400px) rotateY(-8deg) rotateX(3deg);
  }
}

/* --- Showcase slide visual cluster --- */
.showcase-slide__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  width: 100%;
  max-width: 36rem;
  min-width: 0;
  margin-inline: auto;
}

.showcase-slide__desktop {
  width: 100%;
}

.showcase-slide__phones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5);
}

.showcase-slide__phones .device-phone {
  width: min(9.5rem, 38vw);
}

.module-card__preview {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 6.5rem;
}

.module-card__preview .device-phone,
.module-card__preview .device-desktop {
  transition: transform var(--duration-base) var(--ease-out);
}

.module-card:hover .module-card__preview .device-phone,
.module-card:hover .module-card__preview .device-desktop {
  transform: translateY(-4px) scale(1.02);
}

.module-card__preview .device-desktop--card {
  max-width: 10rem;
}

/* Ürün sayfası hero — semantik ekran cihaz içinde */
.device-desktop--product .device-desktop__screen,
.device-phone--product .device-phone__screen {
  background: var(--device-screen-bg);
}

.device-desktop--product .device-desktop__screen .semantic-screen,
.device-phone--product .device-phone__screen .semantic-screen {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: inherit;
  border: 0;
  box-shadow: none;
}

.device-desktop--product {
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
}

.device-phone--product {
  width: min(11rem, 52vw);
  margin-inline: auto;
}

.device-phone--product .device-phone__screen {
  aspect-ratio: 390 / 844;
}
