/* ==========================================================================
   Workesi — Home Page
   Hero, how-it-works, why, pricing, CTA
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: var(--space-8);
  padding-bottom: var(--space-9);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: -1;
}

.hero__bg::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(20, 184, 166, 0.08) 0%,
    transparent 60%
  );
  border-radius: 50%;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-7);
  align-items: center;
}

.hero__content {
  max-width: 560px;
}

.hero__pill {
  margin-bottom: var(--space-3);
}

.hero__title {
  margin-bottom: var(--space-3);
}

.hero__subtitle {
  font-size: var(--fs-md);
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: var(--space-4);
}

.hero__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.hero__stats {
  display: flex;
  gap: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.stat__value {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  color: var(--neutral-900);
}

.stat__label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* Hero illustration */
.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
}

.hero__card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-xl);
  animation: float 6s var(--ease-in-out) infinite;
}

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

.hero__card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-3);
}

.hero__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gradient-accent);
  display: grid;
  place-items: center;
  color: white;
  flex-shrink: 0;
}

.hero__avatar svg {
  width: 24px;
  height: 24px;
}

.hero__card-name {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
}

.hero__card-role {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero__card-role .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success-500);
}

.hero__chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.chat-bubble {
  max-width: 80%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  opacity: 0;
  transform: translateY(8px);
  animation: bubbleIn 0.5s var(--ease-out) forwards;
}

.chat-bubble--in {
  background: var(--bg-muted);
  color: var(--neutral-700);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.chat-bubble--out {
  background: var(--gradient-primary);
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  box-shadow: var(--shadow-sm);
}

.chat-bubble:nth-child(1) {
  animation-delay: 0.3s;
}
.chat-bubble:nth-child(2) {
  animation-delay: 0.7s;
}
.chat-bubble:nth-child(3) {
  animation-delay: 1.1s;
}
.chat-bubble:nth-child(4) {
  animation-delay: 1.5s;
}

@keyframes bubbleIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__card-footer {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.hero__card-footer .status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: var(--fw-medium);
  color: var(--success-600);
}

/* Floating mini-cards around hero */
.hero__mini {
  position: absolute;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  z-index: 2;
}

.hero__mini--1 {
  top: 8%;
  left: -6%;
  animation: float 5s var(--ease-in-out) infinite;
}

.hero__mini--2 {
  bottom: 12%;
  right: -4%;
  animation: float 7s var(--ease-in-out) infinite;
  animation-delay: -2s;
}

.hero__mini-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: white;
}

.hero__mini-icon--green {
  background: var(--success-500);
}
.hero__mini-icon--blue {
  background: var(--primary-500);
}

.hero__mini-icon svg {
  width: 16px;
  height: 16px;
}

/* ---------- How It Works ---------- */
.how__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  position: relative;
}

.how__grid::before {
  content: "";
  position: absolute;
  top: 56px;
  left: 16%;
  right: 16%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-200) 20%,
    var(--primary-200) 80%,
    transparent
  );
  z-index: 0;
}

/* ---------- Why Workesi ---------- */
.why {
  background: var(--bg-soft);
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3) var(--space-5);
}

/* ---------- Pricing ---------- */
.pricing {
  position: relative;
  overflow: hidden;
}

.pricing__card {
  max-width: 480px;
  margin-inline: auto;
  text-align: center;
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
}

.pricing__card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -30%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.06) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.pricing__plan {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--primary-600);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.pricing__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: var(--space-1);
}

.pricing__price .amount {
  font-size: var(--fs-5xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.04em;
  color: var(--neutral-900);
}

.pricing__price .period {
  font-size: var(--fs-md);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}

.pricing__desc {
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.pricing__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
  margin-bottom: var(--space-5);
  padding-block: var(--space-4);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pricing__feature {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-md);
  color: var(--neutral-700);
}

.pricing__feature svg {
  width: 20px;
  height: 20px;
  color: var(--success-500);
  flex-shrink: 0;
}

/* ---------- CTA Band ---------- */
.cta-band {
  background: var(--neutral-900);
  border-radius: var(--radius-2xl);
  padding: var(--space-7) var(--space-5);
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 80% at 50% 100%,
    rgba(59, 130, 246, 0.25) 0%,
    transparent 60%
  );
}

.cta-band__title {
  color: white;
  margin-bottom: var(--space-2);
  position: relative;
}

.cta-band__text {
  color: var(--neutral-300);
  max-width: 480px;
  margin: 0 auto var(--space-4);
  position: relative;
}

.cta-band .btn {
  position: relative;
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 {
  transition-delay: 0.08s;
}
.reveal--delay-2 {
  transition-delay: 0.16s;
}
.reveal--delay-3 {
  transition-delay: 0.24s;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }
  .hero__visual {
    order: -1;
  }
  .hero__content {
    max-width: none;
    text-align: center;
  }
  .hero__actions {
    justify-content: center;
  }
  .hero__subtitle {
    margin-inline: auto;
  }
  .hero__stats {
    justify-content: center;
  }
  .how__grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .how__grid::before {
    display: none;
  }
  .why__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .why__grid {
    grid-template-columns: 1fr;
  }
  .hero__stats {
    gap: var(--space-3);
  }
  .hero__mini {
    display: none;
  }
}
