/* Monochromatic shadcn / Vercel style custom elements */

/* ============================================================
   LANDING PAGE ANIMATIONS
   ============================================================ */

/* --- Fade-in on load (staggered via --delay) --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes gradientShift {
  0%, 100% { opacity: 0.4; transform: scale(1) rotate(0deg); }
  33%      { opacity: 0.6; transform: scale(1.05) rotate(1deg); }
  66%      { opacity: 0.3; transform: scale(0.98) rotate(-1deg); }
}

/* Utility class: animate on load */
.anim-fade-up {
  opacity: 0;
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

.anim-fade {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: var(--delay, 0s);
}

.anim-scale-in {
  opacity: 0;
  animation: scaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

/* Utility class: animate when element scrolls into viewport (via IntersectionObserver) */
.anim-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hero background glow orb --- */
.hero-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 9999px;
  pointer-events: none;
  filter: blur(100px);
  opacity: 0.35;
  animation: gradientShift 8s ease-in-out infinite;
  z-index: 0;
}

.hero-glow--left {
  top: -120px;
  left: -100px;
  background: radial-gradient(circle, rgba(161,161,170,0.35) 0%, transparent 70%);
}

.hero-glow--right {
  bottom: -80px;
  right: -100px;
  background: radial-gradient(circle, rgba(113,113,122,0.25) 0%, transparent 70%);
  animation-delay: 3s;
}

.dark .hero-glow--left {
  background: radial-gradient(circle, rgba(63,63,70,0.5) 0%, transparent 70%);
}

.dark .hero-glow--right {
  background: radial-gradient(circle, rgba(82,82,91,0.35) 0%, transparent 70%);
}

/* --- Feature cards hover lift --- */
.feature-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.08);
}

.dark .feature-card:hover {
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.4);
}

/* Feature card icon subtle bounce on hover */
.feature-card:hover .feature-icon {
  animation: float 2s ease-in-out infinite;
}

/* --- Mockup window subtle float --- */
.mockup-float {
  animation: float 6s ease-in-out infinite;
  animation-delay: 1.5s;
}

/* --- Shimmer badge effect (status pill) --- */
.shimmer-badge {
  position: relative;
  overflow: hidden;
}

.shimmer-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
  border-radius: inherit;
}

.dark .shimmer-badge::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
}

/* --- CTA button hover glow --- */
.cta-primary {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dark .cta-primary:hover {
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

/* --- Typing simulation for mockup assistant text --- */
@keyframes typeReveal {
  from { max-height: 0; opacity: 0; }
  to   { max-height: 300px; opacity: 1; }
}

.mockup-assistant-text {
  overflow: hidden;
  animation: typeReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 1.8s;
  max-height: 0;
  opacity: 0;
}

.mockup-user-msg {
  opacity: 0;
  animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 1.2s;
}

/* --- Navbar entrance --- */
.navbar-animate {
  animation: fadeIn 0.5s ease forwards;
}

/* --- Footer fade in --- */
.footer-animate {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0.3s;
}

/* Reduced motion: disable all custom animations */
@media (prefers-reduced-motion: reduce) {
  .anim-fade-up,
  .anim-fade,
  .anim-scale-in,
  .anim-on-scroll,
  .mockup-float,
  .mockup-assistant-text,
  .mockup-user-msg,
  .shimmer-badge::after,
  .hero-glow,
  .navbar-animate,
  .footer-animate {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    max-height: none !important;
  }
}

/* Custom subtle scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(161, 161, 170, 0.3);
  border-radius: 9999px;
}
.dark ::-webkit-scrollbar-thumb {
  background: rgba(113, 113, 122, 0.4);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(161, 161, 170, 0.6);
}

/* Streaming Blinking Cursor */
.streaming-cursor::after {
  content: '▋';
  display: inline-block;
  margin-left: 2px;
  vertical-align: baseline;
  animation: blink 1s infinite;
  color: #71717a;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Markdown prose rendering in messages */
.prose-ai {
  font-size: 0.9375rem;
  line-height: 1.6;
  padding-top: 2px;
}

.prose-ai > *:first-child {
  margin-top: 0;
}

.prose-ai p {
  margin-bottom: 0.85rem;
}

.prose-ai p:last-child {
  margin-bottom: 0;
}

.prose-ai h1, .prose-ai h2, .prose-ai h3, .prose-ai h4 {
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.6rem;
  color: inherit;
}

.prose-ai h1 { font-size: 1.35rem; }
.prose-ai h2 { font-size: 1.2rem; }
.prose-ai h3 { font-size: 1.05rem; }

.prose-ai ul, .prose-ai ol {
  margin-bottom: 0.85rem;
  padding-left: 1.35rem;
}

.prose-ai ul { list-style-type: disc; }
.prose-ai ol { list-style-type: decimal; }

.prose-ai li {
  margin-bottom: 0.25rem;
}

.prose-ai blockquote {
  border-left: 3px solid #71717a;
  padding-left: 0.9rem;
  font-style: italic;
  margin: 0.9rem 0;
  opacity: 0.85;
}

.prose-ai code:not(pre code) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  background-color: #f4f4f5;
  color: #09090b;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  border: 1px solid #e4e4e7;
}

.dark .prose-ai code:not(pre code) {
  background-color: #27272a;
  color: #fafafa;
  border-color: #3f3f46;
}

/* Code blocks container */
.code-block-wrapper {
  position: relative;
  margin: 1rem 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e4e4e7;
  background-color: #f8fafc;
}

.dark .code-block-wrapper {
  border-color: #27272a;
  background-color: #09090b;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.8rem;
  background-color: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.75rem;
  font-family: monospace;
  color: #64748b;
}

.dark .code-block-header {
  background-color: #18181b;
  border-bottom-color: #27272a;
  color: #a1a1aa;
}

.code-block-wrapper pre {
  margin: 0;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

.dark .copy-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Tables in AI response */
.prose-ai table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.prose-ai th, .prose-ai td {
  border: 1px solid #e4e4e7;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.dark .prose-ai th, .dark .prose-ai td {
  border-color: #27272a;
}

.prose-ai th {
  background-color: #f4f4f5;
  font-weight: 600;
}

.dark .prose-ai th {
  background-color: #18181b;
}
