/* ============================================================
   Enso AI — Hero Section (exact match to original React site)
   ============================================================ */

/* ── Section wrapper ── */
.enso-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 4.5rem;     /* tight gap just below fixed 72px header */
  padding-bottom: 2rem;
  overflow: hidden;
}

/* ── Background image + overlay ── */
.enso-hero__bg {
  position: absolute;
  inset: 0;
}

.enso-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* bg-background/70 overlay */
.enso-hero__bg::after,
.enso-hero__overlay {
  position: absolute;
  inset: 0;
  background: hsl(var(--background) / 0.70);
  content: '';
}

/* ── Decorative blurred orbs ── */
.enso-hero__orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.enso-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
}

.enso-hero__orb--primary {
  top: 5rem;
  right: 0;
  width: 600px;
  height: 600px;
  background: hsl(var(--primary) / 0.10);
}

.enso-hero__orb--accent {
  bottom: 0;
  left: 0;
  width: 500px;
  height: 500px;
  background: hsl(var(--accent) / 0.10);
}

/* ── Inner grid: 2 columns on lg ── */
.enso-hero__inner {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 5rem;
  align-items: start;
  padding-top: 1rem;
  padding-bottom: 3rem;
}

/* ── Text column ── */
.enso-hero__text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Badge */
.enso-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: hsl(var(--primary-muted));
  color: hsl(var(--primary));
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  width: fit-content;
}

/* H1 — text-4xl md:text-5xl lg:text-6xl font-bold leading-tight */
.enso-hero__h1 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: clamp(2.25rem, 5vw, 3.75rem); /* 4xl → 6xl */
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: hsl(var(--foreground));
  margin: 0 0 1.5rem;
}

/* Gradient span — text-gradient */
.enso-hero__h1 .text-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtitle — text-lg md:text-xl text-muted-foreground leading-relaxed */
.enso-hero__sub {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: hsl(var(--muted-foreground));
  line-height: 1.75;
  max-width: 36rem;
  margin: 0 0 2rem;
}

/* CTA row */
.enso-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Hero primary button */
.enso-btn--hero {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 10px 15px -3px hsl(var(--primary) / 0.25);
}

.enso-btn--hero:hover {
  background: hsl(var(--primary-glow));
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

/* Hero secondary button */
.enso-btn--hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border-radius: var(--radius);
  border: 2px solid hsl(var(--border));
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  box-shadow: var(--shadow-md);
}

.enso-btn--hero-secondary:hover {
  border-color: hsl(var(--primary) / 0.30);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* Social proof row */
.enso-hero__proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  color: hsl(var(--muted-foreground));
}

.enso-hero__avatars {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.enso-hero__avatar-chip {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: hsl(var(--secondary));
  border: 2px solid hsl(var(--background));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-left: -0.5rem;
}

.enso-hero__avatar-chip:first-child {
  margin-left: 0;
}

.enso-hero__proof-text {
  font-size: 0.875rem;
}

.enso-hero__proof-divider {
  width: 1px;
  height: 1rem;
  background: hsl(var(--border));
}

/* ── Widget column ── */
.enso-hero__widget-wrap {
  position: relative;
  padding-top: 4rem; /* badge height + margin = pushes card top to H1 level */
}

/* Floating stat badges */
.enso-hero__stat {
  position: absolute;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-lg);
  z-index: 20;
  animation: enso-float 4s ease-in-out infinite;
}

.enso-hero__stat--top {
  top: -1.5rem;
  right: -1.5rem;
  animation-duration: 4s;
}

.enso-hero__stat--bottom {
  bottom: -2rem;
  left: -1.5rem;
  animation-duration: 5s;
  animation-delay: 1s;
}

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

.enso-hero__stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1;
}

.enso-hero__stat-label {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}

/* ── Chat Card ── */
.enso-chat-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 16px); /* rounded-3xl */
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  position: relative;
}

/* Phone notch bar */
.enso-chat-card__notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6rem;
  height: 1.5rem;
  background: hsl(var(--foreground) / 0.10);
  border-radius: 0 0 0.75rem 0.75rem;
  z-index: 10;
}

/* Header */
.enso-chat-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid hsl(var(--border));
  padding-top: 1.75rem; /* clear the notch */
}

.enso-chat-card__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: hsl(var(--primary) / 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.enso-chat-card__avatar img {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}

.enso-chat-card__avatar-fb {
  display: none;
  font-weight: 700;
  font-size: 1rem;
  color: hsl(var(--primary));
}

.enso-chat-card__name {
  font-weight: 600;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  font-family: 'Inter', sans-serif;
}

.enso-chat-card__status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 2px;
}

.enso-chat-card__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e; /* green-500 */
  animation: enso-pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes enso-pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* Messages area */
.enso-chat-card__messages {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 200px;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--border)) transparent;
}

.enso-chat-card__messages::-webkit-scrollbar { width: 3px; }
.enso-chat-card__messages::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 3px;
}

/* Message row */
.enso-chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(15px) scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.enso-chat-msg.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.enso-chat-msg--user {
  flex-direction: row-reverse;
}

.enso-chat-card__msg-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: hsl(var(--primary) / 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.enso-chat-card__msg-avatar img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.enso-chat-msg--user .enso-chat-card__msg-avatar {
  background: hsl(var(--accent) / 0.20);
}

/* Bubble */
.enso-chat-bubble {
  max-width: 75%;
  padding: 0.625rem 1rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  user-select: text;
  cursor: text;
}

/* Bot bubble: bg-card border border-border rounded-bl-md */
.enso-chat-msg--bot .enso-chat-bubble {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  border-bottom-left-radius: 4px;
}

/* User bubble: bg-primary text-primary-foreground rounded-br-md */
.enso-chat-msg--user .enso-chat-bubble {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-bottom-right-radius: 4px;
}

/* Typing indicator */
.enso-typing-indicator {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.enso-typing-indicator.visible {
  opacity: 1;
  transform: translateY(0);
}

.enso-typing-dots {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  border-bottom-left-radius: 4px;
  padding: 0.5rem 0.75rem;
  display: flex;
  gap: 4px;
  align-items: center;
}

.enso-typing-dots span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: hsl(var(--muted-foreground) / 0.50);
  animation: enso-bounce 1s ease-in-out infinite;
}

.enso-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.enso-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes enso-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-5px); }
}

/* Footer: typewriter input */
.enso-chat-card__footer {
  padding: 1rem;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.enso-chat-card__input {
  flex: 1;
  min-height: 1.5rem;
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: hsl(var(--muted) / 0.50);
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  font-family: 'Inter', sans-serif;
  user-select: none;
  pointer-events: none;
}

.enso-chat-card__input:empty::before {
  content: 'Type a message...';
  color: hsl(var(--muted-foreground));
}

/* Blinking cursor */
.enso-chat-card__cursor {
  display: inline-block;
  width: 2px;
  height: 1rem;
  background: hsl(var(--primary));
  margin-left: 2px;
  vertical-align: middle;
  animation: enso-blink 0.5s ease-in-out infinite;
}

.enso-chat-card__cursor.hidden {
  display: none;
}

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

.enso-chat-card__send {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: hsl(var(--muted));
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.5;
  cursor: default;
  color: hsl(var(--muted-foreground));
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .enso-hero__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .enso-hero__text {
    align-items: center;
  }

  .enso-hero__sub {
    margin-left: auto;
    margin-right: auto;
  }

  .enso-hero__proof {
    justify-content: center;
  }

  .enso-hero__widget-wrap {
    max-width: 480px;
    margin: 0 auto;
  }

  .enso-hero__stat--top  { right: -0.5rem; }
  .enso-hero__stat--bottom { left: -0.5rem; }
}

@media (max-width: 480px) {
  .enso-hero__stat { display: none; }
  .enso-hero__proof-divider { display: none; }
}
