/* Motion footer — 21st easemize/motion-footer UI fidelity */

:root {
  --footer-reveal-h: 100vh;
  --footer-pill-bg-1: rgba(255, 255, 255, 0.04);
  --footer-pill-bg-2: rgba(255, 255, 255, 0.015);
  --footer-pill-border: rgba(255, 255, 255, 0.1);
  --footer-pill-highlight: rgba(255, 255, 255, 0.12);
  --footer-pill-inset: rgba(0, 0, 0, 0.55);
  --footer-pill-shadow: rgba(0, 0, 0, 0.45);
}

body {
  overflow-x: clip;
}

[data-page-curtain] {
  position: relative;
  z-index: 10;
  margin-bottom: var(--footer-reveal-h);
  background: var(--bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 1.5rem 1.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: clip;
}

[data-motion-footer].cinematic-footer-wrapper {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: var(--footer-reveal-h);
  width: 100%;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background: #09090b;
  color: #fafafa;
  font-family: "Plus Jakarta Sans", var(--font-display), sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Aurora — centered breathe orb */
[data-footer-aurora] {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80vw;
  height: 60vh;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(180, 180, 190, 0.08) 40%,
    transparent 70%
  );
  animation: footer-breathe 8s ease-in-out infinite alternate;
}

/* Grid — mid-band mask like template */
[data-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.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 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 masked type */
[data-footer-giant] {
  position: absolute;
  left: 50%;
  bottom: -5vh;
  z-index: 0;
  margin: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  font-size: 26vw;
  line-height: 0.75;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Diagonal marquee strip */
[data-footer-marquee] {
  position: absolute;
  top: 3rem;
  left: 0;
  z-index: 10;
  width: 100%;
  overflow: hidden;
  padding-block: 1rem;
  border-block: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(9, 9, 11, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
  transform: rotate(-2deg) scale(1.1);
  pointer-events: none;
}

[data-footer-marquee-track] {
  display: flex;
  width: max-content;
  animation: footer-scroll-marquee 40s linear infinite;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.55);
}

@media (min-width: 768px) {
  [data-footer-marquee-track] {
    font-size: 0.875rem;
  }
}

[data-footer-marquee-group] {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding-inline: 1.5rem;
}

[data-footer-dot] {
  color: rgba(255, 255, 255, 0.35);
}

/* Center stack */
[data-footer-center] {
  position: relative;
  z-index: 10;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
  margin-top: 5rem;
  padding-inline: 1.5rem;
}

[data-footer-headline] {
  margin: 0 0 3rem;
  text-align: center;
  font-size: clamp(2.75rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.95;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.15));
}

[data-footer-actions] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

[data-footer-cta-row],
[data-footer-nav] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

[data-footer-nav] {
  gap: 0.75rem;
  margin-top: 0.25rem;
}

@media (min-width: 768px) {
  [data-footer-nav] {
    gap: 1.5rem;
  }
}

/* Glass pills — template footer-glass-pill */
.footer-glass-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--footer-pill-border);
  background: linear-gradient(145deg, var(--footer-pill-bg-1) 0%, var(--footer-pill-bg-2) 100%);
  box-shadow:
    0 10px 30px -10px var(--footer-pill-shadow),
    inset 0 1px 1px var(--footer-pill-highlight),
    inset 0 -1px 2px var(--footer-pill-inset);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fafafa;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.footer-glass-pill:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 20px 40px -10px rgba(0, 0, 0, 0.65),
    inset 0 1px 1px rgba(255, 255, 255, 0.22);
  color: #fff;
}

.footer-glass-pill--primary {
  padding: 1.25rem 2.5rem;
  font-size: 0.875rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .footer-glass-pill--primary {
    font-size: 1rem;
  }
}

.footer-glass-pill--primary svg {
  color: rgba(250, 250, 250, 0.55);
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.footer-glass-pill--primary:hover svg {
  color: #fff;
}

.footer-glass-pill--secondary {
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(250, 250, 250, 0.55);
}

@media (min-width: 768px) {
  .footer-glass-pill--secondary {
    font-size: 0.875rem;
  }
}

.footer-glass-pill--secondary:hover {
  color: #fff;
}

/* Bottom bar */
[data-footer-bottom] {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 0 1.5rem 2rem;
}

@media (min-width: 768px) {
  [data-footer-bottom] {
    flex-direction: row;
    padding-inline: 3rem;
  }
}

[data-footer-copy] {
  margin: 0;
  order: 2;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.5);
}

@media (min-width: 768px) {
  [data-footer-copy] {
    order: 1;
    font-size: 0.75rem;
  }
}

[data-footer-craft] {
  order: 1;
  margin: 0;
  padding: 0.75rem 1.5rem;
  gap: 0.5rem;
  cursor: default;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.5);
  border-color: rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
  [data-footer-craft] {
    order: 2;
    font-size: 0.75rem;
  }

  [data-footer-craft] span:last-child {
    font-size: 0.875rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: none;
    color: #fafafa;
    margin-left: 0.25rem;
  }
}

[data-footer-heart] {
  color: #ef4444;
  font-size: 0.875rem;
  animation: footer-heartbeat 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

[data-footer-top] {
  order: 3;
  width: 3rem;
  height: 3rem;
  padding: 0;
  color: rgba(250, 250, 250, 0.55);
}

[data-footer-top]:hover {
  color: #fff;
}

[data-footer-top] svg {
  transition: transform 0.3s ease;
}

  [data-footer-top]:hover svg {
  transform: translateY(-6px);
}

[data-footer-end] {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.85rem;
  padding-bottom: 1.25rem;
}

[data-footer-end] [data-footer-bottom] {
  padding-bottom: 0.5rem;
}

[data-section="legal-footer"] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 1.1rem;
  width: 100%;
  padding: 0 1.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(250, 250, 250, 0.45);
}

@media (min-width: 768px) {
  [data-section="legal-footer"] {
    padding-inline: 3rem;
    justify-content: space-between;
    font-size: 0.75rem;
  }
}

[data-section="legal-footer"] a {
  color: rgba(250, 250, 250, 0.55);
  text-decoration: none;
}

[data-section="legal-footer"] a:hover {
  color: #fafafa;
}

[data-legal="contact-email"] {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

[data-footer-legal-links] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.9rem;
}

@keyframes footer-breathe {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }
}

@keyframes footer-scroll-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes footer-heartbeat {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.5));
  }
  15%,
  45% {
    transform: scale(1.2);
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.8));
  }
  30% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-footer-marquee-track],
  [data-footer-aurora],
  [data-footer-heart] {
    animation: none !important;
  }

  [data-motion-footer].cinematic-footer-wrapper {
    position: relative;
    height: auto;
    min-height: 100vh;
  }

  [data-page-curtain] {
    margin-bottom: 0;
  }
}
