
/* =========================================================
   GAJANAN CINEMATIX — FOOTER TO NEXT-PAGE TRANSITION
   Additive only. Does not change existing page layout.

   The transition layer is a FIXED full-viewport overlay that is
   completely hidden (display:none) until JS triggers the reveal.
   It is never in the document flow, so it adds no page height
   and can never be scrolled into view.
   All animations use transform + opacity only (no filter/blur).
   ========================================================= */

:root {
  --gc-orange: #ff5a1f;
  --gc-bg: #101214;
  --gc-white: #f5f5f2;
}

.gc-next-transition[hidden] {
  display: none !important;
}

/* Compact strip that sits at the very bottom of the viewport (below the
   footer), not a full-page panel. */
.gc-next-transition {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: 100%;
  height: clamp(110px, 19vh, 180px);
  margin: 0 !important;
  padding: 0 !important;
  z-index: 99999;
  pointer-events: none;
  overflow: hidden;
  background: var(--gc-bg);
  color: var(--gc-white);
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 100%, 0);
  will-change: transform;
  backface-visibility: hidden;
}

/* Reverse (scroll up -> previous page): strip docks to the top. */
.gc-next-transition.is-reverse {
  top: 0;
  bottom: auto;
  transform: translate3d(0, -100%, 0);
}

.gc-next-transition.is-active {
  opacity: 1;
  visibility: visible;
}

.gc-next-transition.is-running {
  transition: transform .58s cubic-bezier(.16, 1, .3, 1);
  transform: translate3d(0, 0, 0);
}

.gc-next-transition__wipe {
  display: none;
}

.gc-next-transition__orange {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gc-orange);
  transform: scaleX(0);
  transform-origin: left center;
  box-shadow: 0 0 18px rgba(255, 90, 31, .45);
  will-change: transform;
}

.gc-next-transition.is-reverse .gc-next-transition__orange {
  top: auto;
  bottom: 0;
  transform-origin: right center;
}

.gc-next-transition__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 clamp(20px, 5vw, 64px);
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  will-change: transform, opacity;
}

.gc-next-transition__eyebrow {
  font-size: clamp(10px, .75vw, 12px);
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .62;
  margin: 0;
}

.gc-next-transition__title {
  margin: 0;
  max-width: 60vw;
  font-size: clamp(26px, 4.2vw, 54px);
  line-height: 1;
  letter-spacing: -.03em;
  font-weight: 400;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.gc-next-transition__meta {
  position: absolute;
  right: clamp(20px, 5vw, 64px);
  top: 50%;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateY(-50%);
  font-size: clamp(10px, .8vw, 12px);
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.gc-next-transition__line {
  width: clamp(60px, 10vw, 150px);
  height: 2px;
  background: rgba(245, 245, 242, .22);
  overflow: hidden;
  position: relative;
}

.gc-next-transition__line span {
  position: absolute;
  inset: 0;
  background: var(--gc-orange);
  transform: translateX(-101%);
  will-change: transform;
}

.gc-next-transition__arrow {
  font-size: 20px;
  line-height: 1;
  will-change: transform, opacity;
}

/* ------------------------- animations ------------------------- */

.gc-next-transition.is-running .gc-next-transition__orange {
  animation: gcProgress .7s cubic-bezier(.65, 0, .25, 1) forwards;
}

.gc-next-transition.is-running .gc-next-transition__content {
  animation: gcContentIn .5s .1s cubic-bezier(.16, 1, .3, 1) forwards;
}

.gc-next-transition.is-running .gc-next-transition__line span {
  animation: gcLine .6s .1s cubic-bezier(.65, 0, .25, 1) forwards;
}

.gc-next-transition.is-running .gc-next-transition__arrow {
  animation: gcArrow .5s .12s ease-out forwards;
}

.gc-next-transition.is-reverse.is-running .gc-next-transition__arrow {
  animation: gcArrowBack .5s .12s ease-out forwards;
}

@keyframes gcProgress {
  0%   { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

@keyframes gcContentIn {
  0%   { opacity: 0; transform: translate3d(0, 14px, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes gcLine {
  0%   { transform: translate3d(-101%, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes gcArrow {
  0%   { transform: translate3d(0, 0, 0); opacity: .5; }
  100% { transform: translate3d(8px, 0, 0); opacity: 1; }
}

@keyframes gcArrowBack {
  0%   { transform: translate3d(0, 0, 0); opacity: .5; }
  100% { transform: translate3d(-8px, 0, 0); opacity: 1; }
}

/* While the transition is running, stop the old page from moving. */
html.gc-transition-lock,
html.gc-transition-lock body {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

/* ------------------------- responsive ------------------------- */

@media (max-width: 700px) {
  .gc-next-transition {
    height: clamp(96px, 17vh, 140px);
  }

  .gc-next-transition__content {
    padding: 0 20px;
    gap: 6px;
  }

  .gc-next-transition__title {
    font-size: clamp(22px, 7vw, 34px);
    max-width: 58vw;
  }

  .gc-next-transition__eyebrow {
    font-size: 9px;
    letter-spacing: .1em;
  }

  .gc-next-transition__meta {
    right: 20px;
    gap: 8px;
    font-size: 9px;
  }

  .gc-next-transition__line {
    width: 42px;
  }

  .gc-next-transition__arrow {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gc-next-transition.is-running .gc-next-transition__orange,
  .gc-next-transition.is-running .gc-next-transition__content,
  .gc-next-transition.is-running .gc-next-transition__line span,
  .gc-next-transition.is-running .gc-next-transition__arrow {
    animation-duration: .2s !important;
    animation-delay: 0s !important;
  }
}
