/* Audience tabs — built for every business size */

.audiences {
  background: var(--secondary);
  padding: clamp(64px, 8vw, 100px) 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.audience-tabs { max-width: 1040px; margin: 0 auto; }

.audience-tablist {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  padding: 6px; margin-bottom: clamp(32px, 5vw, 48px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-full); box-shadow: var(--shadow-xs);
}
.audience-tab {
  flex: 1 1 auto; min-width: 0;
  padding: 12px 18px; border-radius: var(--r-full);
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
  white-space: nowrap; transition: color .25s, background .25s, box-shadow .25s;
}
.audience-tab:hover { color: var(--text-primary); background: var(--border-light); }
.audience-tab.active {
  color: #fff; background: var(--gradient);
  box-shadow: 0 4px 14px rgba(79, 70, 229, .28);
}
.audience-tab:focus-visible { outline-offset: 3px; }

/* Featured tab — subtle highlight + confetti sparkles */
.audience-tab--featured {
  position: relative; overflow: visible;
}
.audience-tab--featured:not(.active) {
  color: var(--primary);
  background: linear-gradient(135deg, rgba(139, 92, 246, .10) 0%, rgba(79, 70, 229, .08) 100%);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, .18);
  animation: aud-featured-glow 3.5s ease-in-out infinite;
}
.audience-tab--featured:not(.active):hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, .16) 0%, rgba(79, 70, 229, .12) 100%);
  color: var(--primary-hover);
}
.audience-tab--featured.active .audience-tab-sparkles { display: none; }
.audience-tab-label { position: relative; z-index: 1; }
.audience-tab-sparkles {
  position: absolute; inset: 0; pointer-events: none; overflow: visible;
}
.audience-tab-sparkles i {
  position: absolute; width: 4px; height: 4px; border-radius: 1px;
  opacity: 0; animation: aud-confetti 4.2s ease-in-out infinite;
}
.audience-tab-sparkles i:nth-child(1) { left: 12%; top: 20%; background: #8B5CF6; animation-delay: 0s; }
.audience-tab-sparkles i:nth-child(2) { right: 14%; top: 28%; background: #4F46E5; animation-delay: .9s; border-radius: 50%; }
.audience-tab-sparkles i:nth-child(3) { left: 42%; top: 8%; background: #3B82F6; animation-delay: 1.8s; width: 3px; height: 5px; }
.audience-tab-sparkles i:nth-child(4) { right: 28%; bottom: 18%; background: #A78BFA; animation-delay: 2.6s; }
.audience-tab-sparkles i:nth-child(5) { left: 68%; bottom: 22%; background: #6366F1; animation-delay: 3.4s; border-radius: 50%; width: 3px; height: 3px; }
@keyframes aud-featured-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(139, 92, 246, .18), 0 2px 8px rgba(79, 70, 229, .08); }
  50% { box-shadow: 0 0 0 1px rgba(139, 92, 246, .32), 0 2px 14px rgba(79, 70, 229, .16); }
}
@keyframes aud-confetti {
  0%, 78%, 100% { opacity: 0; transform: translateY(0) rotate(0deg) scale(.6); }
  8% { opacity: .85; transform: translateY(-2px) rotate(20deg) scale(1); }
  22% { opacity: .55; transform: translateY(-10px) rotate(45deg) scale(.9); }
  38% { opacity: 0; transform: translateY(-18px) rotate(70deg) scale(.5); }
}
@media (prefers-reduced-motion: reduce) {
  .audience-tab--featured:not(.active) { animation: none; }
  .audience-tab-sparkles { display: none; }
  .audience-photo-card { transform: none; transition: none; }
  .audience-photo:hover .audience-photo-card { transform: none; }
}

.audience-panels { position: relative; min-height: 420px; }
.audience-panel {
  display: none; opacity: 0; transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease;
}
.audience-panel.active {
  display: block; opacity: 1; transform: none;
  animation: aud-panel-in .4s ease forwards;
}
@keyframes aud-panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.audience-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
.audience-copy h3 {
  font-size: clamp(22px, 2.8vw, 30px); margin-bottom: 14px;
}
.audience-copy > p {
  color: var(--text-secondary); font-size: 17px; line-height: 1.7;
}
.audience-copy .audience-note {
  margin-top: 16px; margin-bottom: 20px; font-size: 15px; font-weight: 500; color: var(--text-primary);
}
.audience-copy .btn { margin-top: 4px; }
.audience-list {
  margin: 24px 0 28px; display: grid; gap: 12px;
}
.audience-list li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 15px; color: var(--text-secondary);
}
.audience-list svg {
  width: 20px; height: 20px; color: var(--success); flex: 0 0 20px; margin-top: 2px;
}

/* Photo illustration — reuse .audience-photo on every tab with a custom image */
.audience-photo {
  position: relative; padding: 8px 8px 24px; max-width: 520px; margin: 0 auto;
}
.audience-photo-accent {
  position: absolute; border-radius: var(--r-2xl); pointer-events: none; z-index: 0;
}
.audience-photo-accent--1 {
  top: -6%; right: -3%; width: 58%; height: 52%;
  background: linear-gradient(135deg, rgba(139, 92, 246, .22) 0%, rgba(79, 70, 229, .08) 100%);
}
.audience-photo-accent--2 {
  bottom: -4%; left: -4%; width: 48%; height: 42%;
  background: linear-gradient(120deg, rgba(59, 130, 246, .14) 0%, rgba(139, 92, 246, .06) 100%);
}
.audience-photo-card {
  position: relative; z-index: 1; margin: 0;
  border-radius: var(--r-2xl); overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow:
    var(--shadow-xl),
    0 0 0 1px rgba(79, 70, 229, .10),
    0 28px 56px rgba(71, 85, 105, .14);
  transform: rotate(-1.25deg);
  transition: transform .35s ease, box-shadow .35s ease;
}
.audience-photo-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
}
.audience-photo:hover .audience-photo-card {
  transform: rotate(0deg) translateY(-4px);
  box-shadow:
    var(--shadow-xl),
    0 0 0 1px rgba(79, 70, 229, .14),
    0 36px 64px rgba(71, 85, 105, .18);
}
.audience-photo-card img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 1 / 1; object-fit: cover;
}

@media (max-width: 900px) {
  .audience-tablist { border-radius: var(--r-lg); }
  .audience-tab { flex: 1 1 calc(50% - 4px); font-size: 13px; padding: 10px 12px; white-space: normal; text-align: center; }
  .audience-split { grid-template-columns: 1fr; }
  .audience-photo { order: -1; max-width: 520px; margin: 0 auto; width: 100%; }
  .audience-photo-card { transform: none; }
}
@media (max-width: 480px) {
  .audience-tab { flex: 1 1 100%; }
}
