/* Reset & base */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
}
a {text-decoration:none;}

:root {
  --bg: #f0f0f0;
  --fg: #0b0b0b;
  --perspective: 1800px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Stage */
.stage {
  position: relative;
  width: 1240px;
  margin:0 auto;
  height: 484px;
  color: var(--fg);
  overflow: hidden;
  perspective: var(--perspective);
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Loader overlay */
.loader {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #ffffff;
  transition: opacity 0.2s var(--ease), visibility 0.2s linear;
}
.loader--hide {
  opacity: 0;
  visibility: hidden;
}
.loader__content {
  display: grid;
  gap: 12px;
  justify-items: center;
  min-width: 220px;
}
.loader__ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #ddd;
  border-top-color: #333;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Background canvas (moving gradient) */
#bg {
  position: relative;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 500px;
  display: block;
  filter: blur(24px) saturate(1.05);
  pointer-events: none;
}

/* Only block native scrolling/gestures in carousel mode */
.stage.carousel-mode {
  touch-action: none;
  cursor: grab;
}
.stage.carousel-mode.dragging {
  cursor: grabbing;
}

/* Cards container */
.cards {
  pointer-events:none;
  inset: 0;
  z-index: 10;
  transform-style: preserve-3d;
}
.3d-objects{position:relative;z-index:-1}

/* Card */
.card {
  z-index:1;
  position: absolute;
  pointer-events:auto;
  border-radius:16px;
  box-shadow: 21px 30px 59px rgba(0, 0, 0, 0.4);
  top: 50%;
  left: 50%;
  height:263px;
  width:468px;
  aspect-ratio: 4/5;
  isolation: isolate;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, filter;
  transform-origin: 90% center;
  contain: layout paint; /* reduce layout/paint scope for perf */
}
.card::After{
 content:'';position:absolute;inset:0;
}
.card__frame {
  position:relative;
  z-index:10;
  border-radius: 15px;
  opacity: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
  -webkit-user-drag: none;
  user-select: none;
}
.card__frame iframe{pointer-events:auto;border:0;width:100%;height:100%}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none !important;
    animation: none !important;
  }
}
@media (max-width: 820px){
.cards{transform-style:unset}
}