/* ═══════════════════════════════════════════════════════════
   ZSky AI — Visual CTA Component
   The image/video IS the conversion tool.
   "Create this — free" not "Start creating"
   ═══════════════════════════════════════════════════════════ */

.visual-cta {
  position: relative;
  margin: 2.5rem 0;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  text-decoration: none;
  display: block;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 4px 24px -4px rgba(0, 0, 0, 0.6),
    0 0 40px -8px rgba(56, 189, 248, 0.1);
  transition:
    box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.visual-cta:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.15),
    0 8px 40px -4px rgba(0, 0, 0, 0.7),
    0 0 60px -8px rgba(56, 189, 248, 0.2),
    0 0 120px -16px rgba(129, 140, 248, 0.1);
}

/* Gradient border */
.visual-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(56,189,248,0.3), transparent 40%, transparent 60%, rgba(192,132,252,0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

/* ── Image/Video ─────────────────────────────────────────── */

.visual-cta img,
.visual-cta video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 19px;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), filter 0.6s;
}

.visual-cta:hover img,
.visual-cta:hover video {
  transform: scale(1.02);
  filter: brightness(1.06);
}

/* ── Overlay CTA — the conversion layer ──────────────────── */

.visual-cta .cta-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(3,3,6,0.95) 0%, rgba(3,3,6,0.7) 40%, transparent 100%);
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.visual-cta:hover .cta-overlay {
  opacity: 1;
  transform: translateY(0);
}

.visual-cta .cta-text {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: rgba(240, 240, 248, 0.9);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.visual-cta .cta-text small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(56, 189, 248, 0.6);
  margin-top: 0.3rem;
}

.visual-cta .cta-btn {
  flex-shrink: 0;
  padding: 0.7rem 1.6rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.3s, transform 0.3s;
}

.visual-cta:hover .cta-btn {
  opacity: 0.92;
  transform: scale(1.02);
}

/* ── Always-visible "Made with ZSky" badge ───────────────── */

.visual-cta .made-badge {
  position: absolute;
  top: 12px;
  left: 14px;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  background: rgba(3, 3, 6, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(224, 224, 236, 0.5);
  z-index: 5;
}

.visual-cta .made-badge span {
  color: rgba(56, 189, 248, 0.7);
}

/* ── Mobile — always show CTA, no hover ──────────────────── */

@media (max-width: 768px) {
  .visual-cta {
    margin: 1.5rem -0.5rem;
    border-radius: 14px;
  }

  .visual-cta::before { border-radius: 14px; }
  .visual-cta img, .visual-cta video { border-radius: 13px; }

  .visual-cta .cta-overlay {
    opacity: 1;
    transform: translateY(0);
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 2rem 1.2rem 1.2rem;
  }

  .visual-cta .cta-text { font-size: 1.1rem; }
  .visual-cta .cta-btn { text-align: center; }

  .visual-cta:hover {
    transform: none;
  }

  .visual-cta:hover img,
  .visual-cta:hover video {
    transform: none;
    filter: none;
  }
}

@media (max-width: 480px) {
  .visual-cta {
    margin: 1.25rem -1rem;
    border-radius: 0;
  }

  .visual-cta::before { border-radius: 0; }
  .visual-cta img, .visual-cta video { border-radius: 0; }
  .visual-cta .made-badge { border-radius: 0 0 8px 0; top: 0; left: 0; }
}

@media (hover: none) {
  .visual-cta .cta-overlay {
    opacity: 1;
    transform: translateY(0);
  }
  .visual-cta:hover { transform: none; }
  .visual-cta:hover img, .visual-cta:hover video { transform: none; filter: none; }
}

/* ── Ghost Prompt — typewriter overlay ────────────────────── */

.ghost-prompt {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  padding: 0 1.5rem;
  z-index: 6;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.ghost-label {
  flex-shrink: 0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(56, 189, 248, 0.5);
  background: rgba(3, 3, 6, 0.6);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.15);
  margin-top: 2px;
}

.ghost-text {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(224, 224, 236, 0.75);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
  word-break: break-word;
}

.ghost-cursor {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: rgba(56, 189, 248, 0.8);
  animation: ghost-blink 0.6s step-end infinite;
  margin-left: -2px;
}

.ghost-cursor-done {
  animation: ghost-fade 1.5s ease-out forwards;
}

@keyframes ghost-blink {
  50% { opacity: 0; }
}

@keyframes ghost-fade {
  0% { opacity: 1; }
  60% { opacity: 1; }
  100% { opacity: 0; }
}

/* Mobile — smaller text, simpler layout */
@media (max-width: 768px) {
  .ghost-prompt {
    bottom: 70px;
    padding: 0 1rem;
  }

  .ghost-text {
    font-size: 0.68rem;
    line-height: 1.4;
  }

  .ghost-label {
    font-size: 0.55rem;
  }
}

@media (max-width: 480px) {
  .ghost-prompt {
    bottom: 80px;
  }

  .ghost-text {
    font-size: 0.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .visual-cta, .visual-cta img, .visual-cta video, .visual-cta .cta-overlay { transition: none; }
  .visual-cta .cta-overlay { opacity: 1; transform: none; }
  .ghost-cursor { animation: none; opacity: 0; }
  .ghost-text { opacity: 1; }
}
