/* ============================================
   REKA — Cinematic Motion Footer
   Curtain-reveal + aurora, marquee, glass pills
   ============================================ */

/* Scroll-reveal spacer (footer sits fixed underneath) */
.motion-footer-reveal {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

body.has-motion-footer main {
  position: relative;
  z-index: 2;
}

body.reka-layout.has-motion-footer main {
  background: var(--color-bg);
}

/* --- Footer shell --- */
.motion-footer {
  --mf-fg: rgba(255, 255, 255, 0.92);
  --mf-muted: rgba(255, 255, 255, 0.45);
  --mf-pill-bg-1: rgba(255, 255, 255, 0.06);
  --mf-pill-bg-2: rgba(255, 255, 255, 0.02);
  --mf-pill-border: rgba(255, 255, 255, 0.1);
  --mf-pill-shadow: rgba(0, 0, 0, 0.45);
  --mf-pill-highlight: rgba(255, 255, 255, 0.12);
  --mf-pill-inset: rgba(0, 0, 0, 0.35);

  position: fixed;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--color-dark);
  color: var(--mf-muted);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  z-index: 1;
}

/* Ambient aurora */
.motion-footer__aurora {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80vw;
  height: 60vh;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(5, 183, 114, 0.18) 0%,
    rgba(5, 183, 114, 0.06) 40%,
    transparent 70%
  );
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: mf-breathe 8s ease-in-out infinite alternate;
}

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

/* Grid background */
.motion-footer__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.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
}

/* Giant background word */
.motion-footer__giant-text {
  position: absolute;
  left: 50%;
  bottom: -5vh;
  transform: translateX(-50%);
  font-size: clamp(4rem, 26vw, 18rem);
  line-height: 0.75;
  font-weight: 900;
  letter-spacing: -0.05em;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  z-index: 0;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0;
}

.motion-footer.is-ready .motion-footer__giant-text {
  opacity: 1;
}

/* Diagonal marquee band */
.motion-footer__marquee-band {
  position: absolute;
  top: 3rem;
  left: 0;
  width: 100%;
  overflow: hidden;
  padding: 1rem 0;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 20, 25, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: rotate(-2deg) scale(1.1);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  z-index: 10;
}

.motion-footer__marquee-track {
  display: flex;
  width: max-content;
  animation: mf-marquee 40s linear infinite;
  font-size: clamp(0.625rem, 1.8vw, 0.8125rem);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

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

.motion-footer__marquee-group {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding-inline: 1.5rem;
  flex-shrink: 0;
}

.motion-footer__marquee-dot {
  color: var(--color-primary);
  opacity: 0.65;
}

.motion-footer__marquee-dot--alt {
  color: rgba(255, 255, 255, 0.35);
}

/* Center content */
.motion-footer__center {
  position: relative;
  z-index: 10;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 56rem;
  margin-inline: auto;
  padding: 6rem 1.5rem 2rem;
  text-align: center;
}

.motion-footer__logo {
  display: block;
  margin-bottom: 1.5rem;
  line-height: 0;
  opacity: 0;
  transform: translateY(30px);
}

.motion-footer__logo .reka-logo {
  height: clamp(72px, 12vw, 110px);
  width: auto;
  margin-inline: auto;
}

.motion-footer__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 2.5rem;
  color: var(--mf-fg);
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.45) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.12));
  opacity: 0;
  transform: translateY(40px);
}

.motion-footer__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  opacity: 0;
  transform: translateY(40px);
}

.motion-footer__actions-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.motion-footer__actions-row--secondary {
  gap: 0.75rem;
  margin-top: 0.25rem;
}

/* Glass magnetic pills */
.motion-footer__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.1rem 1.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--mf-pill-border);
  background: linear-gradient(145deg, var(--mf-pill-bg-1) 0%, var(--mf-pill-bg-2) 100%);
  box-shadow:
    0 10px 30px -10px var(--mf-pill-shadow),
    inset 0 1px 1px var(--mf-pill-highlight),
    inset 0 -1px 2px var(--mf-pill-inset);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--mf-fg);
  font-weight: 700;
  font-size: clamp(0.8125rem, 2vw, 1rem);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.4s var(--ease-out-expo),
    border-color 0.4s var(--ease-out-expo),
    box-shadow 0.4s var(--ease-out-expo),
    color 0.3s ease;
  will-change: transform;
}

.motion-footer__pill img {
  height: 22px;
  width: auto;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.motion-footer__pill:hover {
  border-color: rgba(5, 183, 114, 0.45);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow:
    0 20px 40px -10px rgba(0, 0, 0, 0.55),
    inset 0 1px 1px rgba(255, 255, 255, 0.18);
  color: #fff;
}

.motion-footer__pill:hover img {
  opacity: 1;
}

.motion-footer__pill--sm {
  padding: 0.7rem 1.25rem;
  font-weight: 600;
  font-size: clamp(0.6875rem, 1.8vw, 0.8125rem);
  color: var(--mf-muted);
}

.motion-footer__pill--sm:hover {
  color: #fff;
}

.motion-footer__pill--whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.5);
}

.motion-footer__pill-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.motion-footer__pill:hover .motion-footer__pill-icon {
  opacity: 1;
}

/* Bottom bar */
.motion-footer__bar {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
  padding: 0 1.5rem 2rem;
}

@media (min-width: 768px) {
  .motion-footer__bar {
    flex-direction: row;
    padding: 0 3rem 2rem;
  }
}

.motion-footer__copyright {
  order: 2;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

@media (min-width: 768px) {
  .motion-footer__copyright { order: 1; }
}

.motion-footer__credit {
  order: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, var(--mf-pill-bg-1) 0%, var(--mf-pill-bg-2) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
}

@media (min-width: 768px) {
  .motion-footer__credit { order: 2; }
}

.motion-footer__credit strong {
  color: #fff;
  font-weight: 800;
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.8125rem;
}

.motion-footer__credit:hover strong {
  color: var(--color-primary);
}

.motion-footer__heart {
  display: inline-block;
  color: #ff4d6d;
  font-size: 0.875rem;
  animation: mf-heartbeat 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

@keyframes mf-heartbeat {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(255, 77, 109, 0.4)); }
  15%, 45% { transform: scale(1.2); filter: drop-shadow(0 0 10px rgba(255, 77, 109, 0.7)); }
  30% { transform: scale(1); }
}

.motion-footer__top {
  order: 3;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.45);
}

.motion-footer__top svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

.motion-footer__top:hover svg {
  transform: translateY(-4px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .motion-footer__aurora,
  .motion-footer__marquee-track,
  .motion-footer__heart {
    animation: none;
  }

  .motion-footer__giant-text,
  .motion-footer__title,
  .motion-footer__logo,
  .motion-footer__actions {
    opacity: 1;
    transform: none;
  }
}
