/* ============================================================
   CINEMATIC FOOTER — arcoso leads
   Adapted from GSAP/React cinematic footer concept to vanilla
   ============================================================ */

/* ── Page content overlay (covers fixed footer while scrolling) ── */
.page-content {
  position: relative;
  z-index: 2;
  background: var(--black);
}

/* ── Font override for footer (Plus Jakarta Sans via fallback) ── */
.cinematic-footer-wrapper {
  -webkit-font-smoothing: antialiased;
  position: relative;
  height: 100vh;
  width: 100%;
  clip-path: polygon(0% 0, 100% 0%, 100% 100%, 0 100%);
}

.cinematic-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-primary);
  z-index: 1;
}

/* ── Aurora ambient glow ── */
.cinematic-footer .footer-aurora {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80vw;
  height: 60vh;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle at 50% 50%,
    color-mix(in srgb, var(--yellow) 12%, transparent) 0%,
    color-mix(in srgb, var(--blue) 10%, transparent) 40%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: footerBreathe 8s ease-in-out infinite alternate;
}

@keyframes footerBreathe {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

/* ── Grid background ── */
.cinematic-footer .footer-bg-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: 60px 60px;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
}

/* ── Giant background text ── */
.cinematic-footer .footer-giant-bg-text {
  position: absolute;
  bottom: -5vh;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  font-size: 26vw;
  line-height: 0.75;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.05);
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 60%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ── Marquee strip ── */
.cinematic-footer .footer-marquee {
  position: absolute;
  top: 12vh;
  left: 0;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 0;
  z-index: 10;
  transform: rotate(-2deg) scale(1.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.cinematic-footer .footer-marquee-track {
  display: flex;
  flex-direction: row;
  width: max-content;
  animation: footerMarquee 40s linear infinite;
}

.cinematic-footer .footer-marquee-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 28px;
  padding: 0 32px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}

.cinematic-footer .footer-marquee-item .dot {
  color: var(--yellow);
  opacity: 0.6;
}

@keyframes footerMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Center content ── */
.cinematic-footer .footer-center {
  position: relative;
  z-index: 10;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  margin-top: 10vh;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.cinematic-footer .footer-heading {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-align: center;
  margin-bottom: 48px;
  background: linear-gradient(180deg, var(--white) 0%, rgba(255,255,255,0.4) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0px 0px 20px rgba(255,255,255,0.1));
}

/* ── Glass pill buttons ── */
.cinematic-footer .footer-pills {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.cinematic-footer .footer-pills-primary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.cinematic-footer .footer-pills-secondary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.cinematic-footer .footer-glass-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  color: var(--white);
  border: none;
  outline: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  /* Glass defaults */
  background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
  box-shadow:
    0 10px 30px -10px rgba(0,0,0,0.5),
    inset 0 1px 1px rgba(255,255,255,0.08),
    inset 0 -1px 2px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  will-change: transform;
}

.cinematic-footer .footer-glass-pill:hover {
  background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
  border-color: rgba(255,255,255,0.16);
  box-shadow:
    0 20px 40px -10px rgba(0,0,0,0.6),
    inset 0 1px 1px rgba(255,255,255,0.15);
  color: var(--yellow);
}

.cinematic-footer .pill-lg {
  padding: 18px 40px;
  border-radius: 9999px;
  font-size: 14px;
}

.cinematic-footer .pill-sm {
  padding: 10px 24px;
  border-radius: 9999px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

.cinematic-footer .pill-sm:hover {
  color: var(--white);
}

.cinematic-footer .pill-icon {
  width: 20px;
  height: 20px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.cinematic-footer .footer-glass-pill:hover .pill-icon {
  opacity: 1;
}

/* ── Bottom bar ── */
.cinematic-footer .footer-bottom-bar {
  position: relative;
  z-index: 20;
  width: 100%;
  padding: 0 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

@media (min-width: 768px) {
  .cinematic-footer .footer-bottom-bar {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 48px 32px;
  }
}

.cinematic-footer .footer-copyright {
  color: rgba(255,255,255,0.35);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  order: 2;
}

@media (min-width: 768px) {
  .cinematic-footer .footer-copyright {
    order: 1;
  }
}

.cinematic-footer .footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 9999px;
  background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
  box-shadow:
    0 10px 30px -10px rgba(0,0,0,0.5),
    inset 0 1px 1px rgba(255,255,255,0.08),
    inset 0 -1px 2px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: default;
  order: 1;
}

@media (min-width: 768px) {
  .cinematic-footer .footer-badge {
    order: 2;
  }
}

.cinematic-footer .footer-badge-text {
  color: rgba(255,255,255,0.35);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.cinematic-footer .footer-badge-heart {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  color: var(--red);
  animation: footerHeartbeat 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

@keyframes footerHeartbeat {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(255,51,65,0.3)); }
  15%, 45% { transform: scale(1.25); filter: drop-shadow(0 0 10px rgba(255,51,65,0.6)); }
  30% { transform: scale(1); }
}

.cinematic-footer .footer-badge-brand {
  font-weight: 800;
  font-size: 12px;
  color: var(--white);
  letter-spacing: 0;
}

.cinematic-footer .footer-back-to-top {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
  box-shadow:
    0 10px 30px -10px rgba(0,0,0,0.5),
    inset 0 1px 1px rgba(255,255,255,0.08),
    inset 0 -1px 2px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  transition: color 0.3s ease, transform 0.3s ease;
  order: 3;
  padding: 0;
}

.cinematic-footer .footer-back-to-top:hover {
  color: var(--yellow);
}

.cinematic-footer .footer-back-to-top svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.cinematic-footer .footer-back-to-top:hover svg {
  transform: translateY(-4px);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .cinematic-footer .footer-aurora {
    animation: none;
  }
  .cinematic-footer .footer-marquee-track {
    animation: none;
  }
  .cinematic-footer .footer-badge-heart {
    animation: none;
  }
  @keyframes footerBreathe {
    0%, 100% { opacity: 1; }
  }
}
