/**
 * Pakshoma-style sticky footer 3D card.
 * Styles keyed off the footer attribute so layout works even before JS.
 */

.arsam-footer[data-arsam-footer-reveal="1"] {
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

/* Runway ≈ pakshoma end +=210% */
.arsam-footer[data-arsam-footer-reveal="1"] .arsam-footer__runway {
  position: relative;
  height: 240vh;
  background: transparent;
}

/* Sticky stage */
.arsam-footer[data-arsam-footer-reveal="1"] .arsam-footer__sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 100vh;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  box-sizing: border-box;
  perspective: 1000px;
  perspective-origin: 50% 0%;
  -webkit-perspective: 1000px;
  -webkit-perspective-origin: 50% 0%;
  /* visible so rotateX / y% are not clipped away */
  overflow: visible;
  background: transparent;
}

/* Content-sized card (NOT height:100% — that hid the columns until p≈1) */
.arsam-footer[data-arsam-footer-reveal="1"] .arsam-footer__panel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 56px 0 28px;
  border-radius: 0 0 2rem 2rem;
  background: var(--arsam-navy-950, #070b14);
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.35);
  transform-origin: 50% 0%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity;
  /* JS sets transform/opacity with !important each frame */
}

/* Keep sticky usable on the homepage chrome */
html[data-arsam-footer-reveal="on"] body.arsam-site,
html[data-arsam-footer-reveal="on"] .arsam-main,
html[data-arsam-footer-reveal="on"] #content {
  overflow: visible !important;
  transform: none !important;
  filter: none !important;
  perspective: none !important;
}

@media (max-width: 900px) {
  .arsam-footer[data-arsam-footer-reveal="1"] .arsam-footer__runway {
    height: 180vh;
  }

  .arsam-footer[data-arsam-footer-reveal="1"] .arsam-footer__panel {
    padding-top: 40px;
    border-radius: 0 0 1rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arsam-footer[data-arsam-footer-reveal="1"] .arsam-footer__runway {
    height: auto !important;
  }

  .arsam-footer[data-arsam-footer-reveal="1"] .arsam-footer__sticky {
    position: relative !important;
    height: auto !important;
    min-height: 0 !important;
    perspective: none !important;
  }

  .arsam-footer[data-arsam-footer-reveal="1"] .arsam-footer__panel {
    transform: none !important;
    opacity: 1 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}
