/* ─── HERO ───────────────────────────────────────── */
#hero {
  padding: 140px 0 80px;
  background: var(--white);
  position: relative; overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148,163,184,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
}

.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}

.hero-left { position: relative; z-index: 1; }

.hero-headline {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 900; line-height: 1.1;
  color: var(--navy); margin-bottom: 20px;
}
.hero-headline .hl-orange { color: var(--orange); }
.hero-headline .hl-blue { color: var(--blue); }

.hero-sub {
  font-size: 17px; font-weight: 500; color: var(--muted);
  line-height: 1.65; margin-bottom: 36px; max-width: 460px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-badges {
  display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap;
}
.hero-badge {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--slate);
}
.hero-badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
}

/* ─── FLOW DIAGRAM ───────────────────────────────── */
.hero-flow { position: relative; z-index: 1; }

.flow-wrapper {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 8px 40px rgba(15,40,71,0.07);
}

.flow-row {
  display: flex; align-items: center; gap: 0; justify-content: space-between;
}

/* Trigger card */
.flow-trigger-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  display: flex; align-items: center; overflow: hidden;
  box-shadow: 0 1px 6px rgba(15,40,71,0.06);
  min-width: 120px;
}
.flow-trigger-card .fa { width: 8px; background: var(--blue); align-self: stretch; min-height: 52px; border-radius: 4px 0 0 4px; }
.flow-trigger-card .fb { padding: 10px 14px; }
.flow-trigger-card .fb span { font-size: 14px; font-weight: 800; color: var(--navy); }

/* Agent card */
.flow-agent-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  display: flex; align-items: center; overflow: hidden;
  box-shadow: 0 1px 6px rgba(15,40,71,0.06);
  min-width: 140px;
}
.flow-agent-card .fa { width: 8px; background: var(--orange); align-self: stretch; min-height: 52px; border-radius: 4px 0 0 4px; }
.flow-agent-card .fb { padding: 10px 14px; display: flex; align-items: center; gap: 8px; }
.flow-agent-card .fb span { font-size: 14px; font-weight: 800; color: var(--navy); }

.agent-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--orange); opacity: 0.5;
  animation: agent-pulse 1.5s ease-in-out infinite;
}
@keyframes agent-pulse { 0%,100%{transform:scale(1);opacity:0.5} 50%{transform:scale(1.4);opacity:1} }

/* Output cards */
.flow-outputs { display: flex; flex-direction: column; gap: 8px; }
.flow-output-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; overflow: hidden;
  box-shadow: 0 1px 4px rgba(15,40,71,0.05);
  min-width: 120px;
}
.flow-output-card .fa { width: 6px; align-self: stretch; min-height: 40px; border-radius: 3px 0 0 3px; }
.flow-output-card .fb { padding: 8px 12px; font-size: 13px; font-weight: 700; color: var(--navy); }

/* Animated arrow */
.flow-arrow-h {
  height: 2px; flex: 1; min-width: 24px; max-width: 40px;
  background: linear-gradient(90deg, var(--border), var(--blue));
  border-radius: 1px; position: relative; margin: 0 4px;
}
.flow-arrow-h::after {
  content: '';
  position: absolute; right: -5px; top: -4px;
  border: 4px solid transparent;
  border-left: 6px solid var(--blue);
}
.flow-arrow-h .pulse {
  position: absolute; left: 0; top: -2px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); opacity: 0;
  animation: pulse-travel 2s ease-in-out infinite;
}
@keyframes pulse-travel {
  0%   { left: 0; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: calc(100% - 6px); opacity: 0; }
}

/* Fan lines */
.flow-fan {
  display: flex; flex-direction: column;
  gap: 8px; justify-content: center;
  padding: 0 8px;
}
.flow-fan-line {
  height: 2px; width: 32px;
  background: linear-gradient(90deg, var(--border), var(--blue));
  border-radius: 1px; position: relative;
}
.flow-fan-line::after {
  content: ''; position: absolute; right: -5px; top: -3px;
  border: 3px solid transparent; border-left: 5px solid var(--blue);
}
.flow-fan-line .dot {
  position: absolute; left: 0; top: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); opacity: 0;
  animation: fan-travel 2s ease-in-out infinite;
}
.flow-fan-line:nth-child(1) .dot { animation-delay: 0s; }
.flow-fan-line:nth-child(2) .dot { animation-delay: 0.35s; }
.flow-fan-line:nth-child(3) .dot { animation-delay: 0.7s; }
.flow-fan-line:nth-child(4) .dot { animation-delay: 1.05s; }
.flow-fan-line:nth-child(5) .dot { animation-delay: 1.4s; }
@keyframes fan-travel {
  0%   { left: 0; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}

/* Growth chart row */
.flow-growth-row {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
}
.flow-growth-label2 {
  font-size: 10px; font-weight: 700; letter-spacing: 2.5px;
  color: var(--muted); text-transform: uppercase; white-space: nowrap;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-flow { order: -1; }
}
