/* ============================================
   MacBook GLB — Three.js viewer
   ============================================ */

.hero__device {
  position: relative;
  overflow: visible;
  width: 100%;
}

.hero__device::before {
  content: '';
  position: absolute;
  top: 54%;
  left: 50%;
  width: 135%;
  height: 118%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse 46% 40% at 50% 48%,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(201, 169, 110, 0.025) 38%,
    transparent 68%
  );
  filter: blur(42px);
  pointer-events: none;
  z-index: 0;
}

.hero-macbook {
  width: 100%;
  max-width: min(480px, 100%);
  height: clamp(240px, 42vw, 420px);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  overflow: visible;
  background: transparent;
}

.hero-macbook__canvas {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  touch-action: pan-y;
  background: transparent;
  filter:
    drop-shadow(0 26px 44px rgba(0, 0, 0, 0.4))
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
}

.hero-macbook__loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.35);
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hero-macbook.is-ready .hero-macbook__loader {
  opacity: 0;
}

@media (max-width: 1024px) {
  .hero-macbook {
    max-width: min(420px, 92vw);
    height: clamp(220px, 50vw, 360px);
  }
}

@media (max-width: 768px) {
  .hero__device::before {
    width: 120%;
    height: 105%;
    filter: blur(28px);
  }

  .hero-macbook {
    max-width: min(380px, 94vw);
    height: clamp(200px, 56vw, 320px);
  }

  .hero-macbook__canvas {
    filter:
      drop-shadow(0 18px 32px rgba(0, 0, 0, 0.35))
      drop-shadow(0 8px 14px rgba(0, 0, 0, 0.2));
  }
}

@media (max-width: 480px) {
  .hero-macbook {
    max-width: min(340px, 96vw);
    height: clamp(180px, 58vw, 280px);
  }

  .hero__device::before {
    opacity: 0.85;
    filter: blur(20px);
  }
}

@media (max-width: 380px) {
  .hero-macbook {
    height: clamp(165px, 54vw, 240px);
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .hero-macbook {
    max-width: min(320px, 45vw);
    height: clamp(140px, 38vh, 220px);
  }

  .hero__device::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-macbook__loader {
    transition: none;
  }
}
