@import url('../vendor/fonts/plus-jakarta-sans/plus-jakarta-sans.css');

/* ==========================================================================
   Cinematic Footer - Theme Variables
   ========================================================================== */
.cinematic-footer-wrapper {
  font-family: 'Plus Jakarta Sans', 'Dana', sans-serif;
  -webkit-font-smoothing: antialiased;
  direction: ltr;

  --cf-pill-bg-1: rgba(255, 255, 255, 0.03);
  --cf-pill-bg-2: rgba(255, 255, 255, 0.01);
  --cf-pill-shadow: rgba(152, 35, 207, 0.5);
  --cf-pill-highlight: rgba(255, 255, 255, 0.1);
  --cf-pill-inset-shadow: rgba(152, 35, 207, 0.8);
  --cf-pill-border: rgba(255, 255, 255, 0.08);

  --cf-pill-bg-1-hover: rgba(255, 255, 255, 0.08);
  --cf-pill-bg-2-hover: rgba(255, 255, 255, 0.02);
  --cf-pill-border-hover: rgba(255, 255, 255, 0.2);
  --cf-pill-shadow-hover: rgba(152, 35, 207, 0.7);
  --cf-pill-highlight-hover: rgba(255, 255, 255, 0.2);

  --cf-primary: #9823cf;
  --cf-secondary: #a82ee0;
  --cf-destructive: #e74c3c;
  --cf-foreground: #ffffff;
  --cf-background: #12082a;
  --cf-border: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Keyframe Animations
   ========================================================================== */
@keyframes cf-breathe {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }
}

@keyframes cf-scroll-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes cf-heartbeat {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 5px rgba(231, 76, 60, 0.5));
  }

  15%,
  45% {
    transform: scale(1.2);
    filter: drop-shadow(0 0 10px rgba(231, 76, 60, 0.8));
  }

  30% {
    transform: scale(1);
  }
}

/* ==========================================================================
   Grid Background
   ========================================================================== */
.cf-bg-grid {
  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);
  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);
}

/* ==========================================================================
   Aurora Glow
   ========================================================================== */
.cf-aurora {
  background: radial-gradient(circle at 50% 50%,
      rgba(152, 35, 207, 0.25) 0%,
      rgba(152, 35, 207, 0.15) 40%,
      transparent 70%);
}

/* ==========================================================================
   Glass Pill
   ========================================================================== */
.cf-glass-pill {
  background: linear-gradient(145deg, var(--cf-pill-bg-1) 0%, var(--cf-pill-bg-2) 100%);
  box-shadow:
    0 10px 30px -10px var(--cf-pill-shadow),
    inset 0 1px 1px var(--cf-pill-highlight),
    inset 0 -1px 2px var(--cf-pill-inset-shadow);
  border: 1px solid var(--cf-pill-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cf-glass-pill:hover {
  background: linear-gradient(145deg, var(--cf-pill-bg-1-hover) 0%, var(--cf-pill-bg-2-hover) 100%);
  border-color: var(--cf-pill-border-hover);
  box-shadow:
    0 20px 40px -10px var(--cf-pill-shadow-hover),
    inset 0 1px 1px var(--cf-pill-highlight-hover);
  color: var(--cf-foreground);
}

/* ==========================================================================
   Giant Background Text
   ========================================================================== */
.cf-giant-bg-text {
  font-size: 16vw;
  line-height: 0.75;
  font-weight: 900;
  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.1) 0%, transparent 60%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ==========================================================================
   Metallic Text Glow
   ========================================================================== */
.cf-text-glow {
  background: linear-gradient(180deg, var(--cf-foreground) 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.15));
}

/* ==========================================================================
   Marquee
   ========================================================================== */
.cf-marquee-track {
  display: flex;
  width: max-content;
  animation: cf-scroll-marquee 40s linear infinite;
}

.cf-marquee-item {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 0 1.5rem;
}

.cf-marquee-item span {
  white-space: nowrap;
}

/* ==========================================================================
   Heartbeat
   ========================================================================== */
.cf-heartbeat {
  animation: cf-heartbeat 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

/* ==========================================================================
   Breathe Animation
   ========================================================================== */
.cf-breathe {
  animation: cf-breathe 8s ease-in-out infinite alternate;
}

/* ==========================================================================
   Magnetic Button
   ========================================================================== */
.cf-magnetic-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--cf-foreground);
  transform-style: preserve-3d;
  will-change: transform;
}

.cf-magnetic-btn svg {
  transition: color 0.3s ease;
}

.cf-magnetic-btn:hover svg {
  color: var(--cf-foreground);
}

/* ==========================================================================
   Main Layout
   ========================================================================== */
.cf-wrapper {
  position: relative;
  height: 100vh;
  width: 100%;
}

.cf-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  display: flex;
  height: 100vh;
  width: 100%;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background-color: var(--cf-background);
  color: var(--cf-foreground);
}

/* Ambient Light */
.cf-ambient {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80vw;
  height: 60vh;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* Grid Overlay */
.cf-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Giant Text */
.cf-giant-text {
  position: absolute;
  bottom: -5vh;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

/* ==========================================================================
   Marquee Section (Top)
   ========================================================================== */
.cf-marquee-section {
  position: absolute;
  top: 3rem;
  left: 0;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--cf-border);
  border-bottom: 1px solid var(--cf-border);
  background-color: rgba(30, 10, 60, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 0;
  z-index: 10;
  transform: rotate(-2deg) scale(1.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Main Center Content
   ========================================================================== */
.cf-main-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 0;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
}

.cf-heading {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-bottom: 3rem;
  text-align: center;
  line-height: 1.1;
}

.cf-links-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.cf-primary-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.cf-secondary-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Bottom Bar
   ========================================================================== */
.cf-bottom-bar {
  position: relative;
  z-index: 20;
  width: 100%;
  padding: 0 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.cf-copyright {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #ffffff;
  line-height: 1.8;
}

.cf-dev-link {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cf-dev-link:hover {
  color: #ffffff;
}

.cf-love-badge {
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: default;
}

.cf-love-badge .cf-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #ffffff;
}

.cf-love-badge .cf-brand {
  font-weight: 900;
  font-size: 0.75rem;
  letter-spacing: normal;
  color: var(--cf-foreground);
  margin-left: 0.25rem;
}

.cf-scroll-top-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: transparent;
  border: 1px solid var(--cf-pill-border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.cf-scroll-top-btn:hover {
  color: var(--cf-foreground);
  border-color: var(--cf-pill-border-hover);
}

.cf-scroll-top-btn svg {
  transition: transform 0.3s ease;
}

.cf-scroll-top-btn:hover svg {
  transform: translateY(-6px);
}

/* ==========================================================================
   Trust Badges (نمادهای اعتماد)
   ========================================================================== */
.cf-trust-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 640px;
  margin: 1.25rem auto 0;
  padding: 0 1rem;
  z-index: 10;
}

.cf-trust-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  overflow: hidden;
}

.cf-trust-badge:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(152,35,207,0.25), inset 0 1px 0 rgba(255,255,255,0.9);
  border-color: rgba(152,35,207,0.3);
}

.cf-trust-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Fallback when no image - letter */
.cf-trust-badge-placeholder {
  font-size: 0.6rem;
  font-weight: 700;
  color: #12082a;
  text-align: center;
  line-height: 1.2;
}

/* ==========================================================================
   Responsive - FIX CENTERING ON MOBILE
   ========================================================================== */
@media (max-width: 768px) {
  /* wrapper & footer heights use dvh for mobile browser chrome */
  .cf-wrapper {
    height: 100vh;
    height: 100dvh;
    min-height: 620px;
  }

  .cf-footer {
    height: 100vh;
    height: 100dvh;
    min-height: 620px;
    align-items: center;
  }

  .cf-heading {
    font-size: 2rem;
    text-align: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .cf-main-content {
    padding: 6rem 1.25rem 1rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .cf-links-group {
    width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .cf-marquee-section {
    top: 1.5rem;
    left: 50%;
    width: 120%;
    transform: translateX(-50%) rotate(-2deg) scale(1);
    transform-origin: center;
  }

  .cf-bottom-bar {
    gap: 0.75rem;
    padding: 0 1.25rem 1.5rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .cf-bottom-bar .cf-glass-pill {
    width: auto;
    max-width: 100%;
    text-align: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .cf-bottom-bar a {
    text-align: center;
    width: 100%;
  }

  .cf-primary-links {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.85rem;
  }

  .cf-primary-links .cf-magnetic-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .cf-secondary-links {
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  /* trust badges mobile */
  .cf-trust-badges {
    gap: 0.6rem;
    margin-top: 1rem;
    padding: 0 0.75rem;
    justify-content: center;
  }

  .cf-trust-badge {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  .cf-giant-text {
    bottom: -2vh;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
  }

  .cf-giant-bg-text {
    font-size: 14vw;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .cf-wrapper {
    min-height: 580px;
  }
  .cf-footer {
    min-height: 580px;
  }

  .cf-heading {
    font-size: 1.65rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    padding: 0 0.5rem;
  }

  .cf-giant-bg-text {
    font-size: 12vw;
  }

  .cf-main-content {
    padding: 5.5rem 1rem 1rem;
  }

  .cf-primary-links .cf-magnetic-btn {
    max-width: 280px;
    padding: 1rem 1.5rem !important;
    font-size: 0.8rem !important;
  }

  .cf-secondary-links .cf-magnetic-btn {
    padding: 0.6rem 1rem !important;
    font-size: 0.7rem !important;
  }

  .cf-trust-badge {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    padding: 5px;
  }

  .cf-trust-badges {
    gap: 0.5rem;
  }

  .cf-marquee-section {
    width: 135%;
  }
}

@media (max-width: 360px) {
  .cf-heading {
    font-size: 1.4rem;
  }
  .cf-trust-badge {
    width: 52px;
    height: 52px;
  }
}