:root {
  --radius: clamp(14px, 1.8vw, 22px);
  --gx: 50;
  --gy: 36;
  --glare: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-color: #e6e1d8;
  background-image: radial-gradient(ellipse at 50% 42%, rgba(255, 252, 247, 0.92), transparent 62%);
  padding: clamp(16px, 4vw, 48px);
}

.scene {
  width: min(92vw, calc((100dvh - 2 * clamp(16px, 4vw, 48px)) * 1179 / 1558), 760px);
  perspective: 1100px;
}

.card {
  position: relative;
  border-radius: var(--radius);
  transform-style: preserve-3d;
  box-shadow:
    0 12px 28px rgba(48, 36, 24, 0.1),
    0 28px 64px rgba(48, 36, 24, 0.16);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--glare);
  background:
    radial-gradient(
      42% 36% at calc(var(--gx) * 1%) calc(var(--gy) * 1%),
      rgba(255, 255, 255, 0.7),
      rgba(255, 255, 255, 0.16) 34%,
      transparent 62%
    ),
    linear-gradient(
      calc(108deg + (var(--gx) - 50) * 0.45deg),
      transparent 30%,
      rgba(255, 255, 255, 0.28) 48%,
      transparent 66%
    );
  mix-blend-mode: soft-light;
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transform: none !important;
  }

  .glare {
    display: none;
  }
}
