/* ==========================================================================
   Hero section
   Only styles for the homepage hero live here. Edit this file to change
   the hero without touching header.css or any other section.
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-2xl);
  background: var(--color-bg);
}

/* Soft brand-colored glow in the background, purely decorative */
.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, rgba(90, 55, 195, 0.12) 0%, rgba(244, 119, 33, 0.06) 55%, rgba(255, 255, 255, 0) 75%);
  pointer-events: none;
  z-index: 0;
}

/* A second, quieter glow bottom-left balances the composition so the
   panel on the right doesn't feel like it's floating alone. */
.hero::after {
  content: "";
  position: absolute;
  bottom: -18%;
  left: -10%;
  width: 32vw;
  height: 32vw;
  max-width: 420px;
  max-height: 420px;
  background: radial-gradient(circle, rgba(244, 119, 33, 0.07) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: var(--space-xl);
  /* Full bleed: stretch edge-to-edge instead of sitting inside the
     1200px .container used elsewhere, with fluid side padding so it
     never touches the glass on very wide screens. */
  width: 100%;
  max-width: none;
  padding-inline: var(--edge-pad);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
  max-width: 620px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(90, 55, 195, 0.06);
  border: 1px solid rgba(90, 55, 195, 0.18);
  color: var(--color-purple-mid);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-accent);
}

.hero-headline {
  font-size: var(--fs-h1);
  color: var(--color-indigo-deep);
  letter-spacing: -0.01em;
}

.hero-headline .accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subheadline {
  font-size: 1.15rem;
  line-height: var(--lh-normal);
  color: var(--color-text-muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-xs);
}

.hero-cta {
  padding: 1rem 1.9rem;
  font-size: 1rem;
}

.hero-subcta {
  padding: 1rem 1.9rem;
  font-size: 1rem;
}

/* ---- Trust / stats strip ----
   Quiet, numbers-first credibility row under the CTAs — the same figures
   used in the Why Choose Us section, so nothing here is a new claim. */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(40, 16, 115, 0.1);
  width: 100%;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-left: var(--space-lg);
  border-left: 1px solid rgba(40, 16, 115, 0.14);
}

.hero-stat:first-child {
  padding-left: 0;
  border-left: none;
}

.hero-stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-indigo-deep);
}

.hero-stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* ---- Decorative visual ---- */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* let the graphic ride toward the true edge on wide screens */
  width: 100%;
}

/* Faint engineering-style dot grid behind the panel — adds a bit of
   technical texture without competing with the graphic itself. */
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -12% -6% -12% 6%;
  background-image: radial-gradient(rgba(90, 55, 195, 0.16) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(circle at 65% 45%, black 0%, transparent 68%);
  mask-image: radial-gradient(circle at 65% 45%, black 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

/* The graphic now sits inside a bordered "dashboard card" — a common,
   tidy way to present an abstract data graphic as a real product screen
   rather than loose line art floating on the page. */
.hero-graphic-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  background: var(--color-bg);
  border: 1px solid rgba(40, 16, 115, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-lg) var(--space-lg) var(--space-md);
}

.hero-panel-tag {
  position: absolute;
  top: -14px;
  left: 28px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  background: var(--color-bg);
  border: 1px solid rgba(40, 16, 115, 0.1);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-indigo-deep);
}

.hero-panel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-orange);
  animation: hero-panel-pulse 1.8s ease-in-out infinite;
}

.hero-visual svg {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes hero-panel-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-visual {
    order: -1;
    max-width: 360px;
    margin-inline: auto;
  }

  .hero-content {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-block: var(--space-xl);
  }

  .hero-stats {
    gap: var(--space-md);
  }

  .hero-stat {
    padding-left: var(--space-md);
  }
}

/* ---- Bars, line + dot animation ----
   The whole graphic builds itself once on load, left to right: the three
   bars fill upward from their own base one after another, then the accent
   line draws itself from its low/left start to its high/right end along
   the exact path it already follows, then the dot pops in at the endpoint
   and settles into a slow blink once everything has stopped moving. */
.hero-bar {
  transform-box: fill-box;
  transform-origin: bottom;
  transform: scaleY(0);
  animation: hero-bar-grow 0.7s var(--ease-out) forwards;
}

.hero-bar-1 {
  animation-delay: 0.1s;
}

.hero-bar-2 {
  animation-delay: 0.35s;
}

.hero-bar-3 {
  animation-delay: 0.6s;
}

.hero-line {
  stroke-dasharray: 437.17;
  stroke-dashoffset: 437.17;
  animation: hero-line-draw 1.8s var(--ease-out) 1s forwards;
}

.hero-dot-group {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.4);
  animation:
    hero-dot-pop 0.5s var(--ease-out) 2.7s forwards,
    hero-dot-blink 1.3s ease-in-out 3.3s infinite;
}

@keyframes hero-bar-grow {
  to {
    transform: scaleY(1);
  }
}

@keyframes hero-line-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes hero-dot-pop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes hero-dot-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bar {
    animation: none;
    transform: scaleY(1);
  }

  .hero-line {
    animation: none;
    stroke-dashoffset: 0;
  }

  .hero-dot-group {
    animation: none;
    opacity: 1;
    transform: scale(1);
  }

  .hero-panel-dot {
    animation: none;
  }
}
