/* ==========================================================================
   WebUtilities Modern Spotlight Hero & Background Aurora Styles
   Raycast / Linear aesthetic: Clean, uncluttered, high-converting design.
   ========================================================================== */

.hero {
  position: relative;
  padding: 6rem 1rem 4rem 1rem;
  text-align: center;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Aurora Mesh & Geometric Glow */
.hero-aurora-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.aurora-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.12;
  will-change: transform, opacity;
  pointer-events: none;
}

[data-theme="dark"] .aurora-glow {
  opacity: 0.22;
}

.glow-1 {
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 650px;
  height: 350px;
  background: radial-gradient(circle, #6366f1 0%, #8b5cf6 50%, transparent 75%);
  animation: pulseAura 9s ease-in-out infinite alternate;
}

.glow-2 {
  top: 10%;
  left: 25%;
  width: 380px;
  height: 240px;
  background: radial-gradient(circle, #3b82f6 0%, #6366f1 60%, transparent 80%);
  animation: floatSlow 12s ease-in-out infinite alternate;
}

.glow-3 {
  top: 15%;
  right: 22%;
  width: 350px;
  height: 230px;
  background: radial-gradient(circle, #8b5cf6 0%, #6366f1 60%, transparent 80%);
  animation: floatReverse 14s ease-in-out infinite alternate;
}

/* Subtle High-Tech Grid Pattern */
.hero-grid-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, black 40%, transparent 90%);
  opacity: 0.55;
  pointer-events: none;
}

/* Hero Content Container */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
}

/* Top Announcement Pill Badge */
.hero-badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  color: var(--text-primary);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.hero-badge-pill:hover {
  border-color: var(--color-brand-primary);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.18);
  transform: translateY(-1px);
  color: var(--text-primary);
}

.hero-pill-indicator {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.hero-pill-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #10b981;
  animation: livePing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.hero-pill-arrow {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.hero-badge-pill:hover .hero-pill-arrow {
  transform: translateX(2px);
  color: var(--color-brand-primary);
}

/* Typography */
.hero-title {
  font-size: clamp(2.3rem, 5vw, 3.65rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

/* Dynamic Rotating Headline */
.hero-dynamic-text-wrap {
  display: inline-block;
  position: relative;
  vertical-align: baseline;
  min-height: 1.15em;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.hero-dynamic-text-wrap.word-out {
  opacity: 0;
  transform: translateY(-8px);
}

.hero-dynamic-text-wrap.word-in {
  opacity: 0;
  transform: translateY(8px);
  transition: none !important;
}

.hero-dynamic-word {
  display: inline-block;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

[data-theme="dark"] .hero-dynamic-word {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title-sub {
  display: inline;
  font-weight: 800;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.25rem auto;
}

/* Spotlight Search Container */
.hero-search-container {
  position: relative;
  max-width: 720px;
  margin: 0 auto 2rem auto;
}

.spotlight-search {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-fast);
}

.spotlight-search:focus-within {
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18), 0 16px 36px -10px rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

.spotlight-search .search-input {
  width: 100%;
  height: 56px;
  padding: 0 5.5rem 0 3.25rem;
  font-size: 1.08rem;
  font-weight: 450;
  border: none;
  background: transparent;
  color: var(--text-primary);
  border-radius: var(--radius-xl);
  outline: none;
  box-shadow: none;
}

.spotlight-search .search-icon-pos {
  position: absolute;
  left: 1.2rem;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.spotlight-search:focus-within .search-icon-pos {
  color: var(--color-brand-primary);
}

/* Keyboard Shortcut Badge */
.search-shortcut-badge {
  position: absolute;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  pointer-events: none;
  user-select: none;
}

.search-shortcut-badge kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  font-size: 0.72rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--border-color);
}

.spotlight-search .search-clear-btn {
  position: absolute;
  right: 4.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  font-size: 1rem;
  border-radius: var(--radius-full);
}

.spotlight-search .search-clear-btn:hover {
  color: var(--text-primary);
}

/* Floating Live Dropdown for Hero Search */
.hero-live-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 70;
  max-height: 420px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(99, 102, 241, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: left;
  animation: heroDropdownSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes heroDropdownSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-surface-subtle);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.hero-dropdown-header .header-tag {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-brand-primary);
}

.hero-dropdown-header .header-hint kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-size: 0.7rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.hero-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.1rem;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.hero-dropdown-item:last-of-type {
  border-bottom: none;
}

.hero-dropdown-item:hover,
.hero-dropdown-item.selected {
  background: var(--bg-surface-subtle);
  padding-left: 1.35rem;
}

.hero-dropdown-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.hero-item-cat {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(99, 102, 241, 0.12);
  color: var(--color-brand-primary);
  flex-shrink: 0;
}

.hero-item-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.hero-item-name {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-search-highlight {
  background: rgba(99, 102, 241, 0.2);
  color: var(--color-brand-primary);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 700;
}

.hero-item-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.hero-dropdown-item-arrow {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-left: 0.75rem;
  transition: transform var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}

.hero-dropdown-item:hover .hero-dropdown-item-arrow,
.hero-dropdown-item.selected .hero-dropdown-item-arrow {
  transform: translateX(4px);
  color: var(--color-brand-primary);
}

.hero-dropdown-empty {
  padding: 2.2rem 1.5rem;
  text-align: center;
  color: var(--text-secondary);
}

.hero-dropdown-empty .empty-icon {
  font-size: 1.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.hero-dropdown-empty p {
  margin: 0 0 0.35rem 0;
  font-size: 0.95rem;
}

.hero-dropdown-empty small {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero-dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1.1rem;
  background: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-color);
  font-size: 0.78rem;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

.hero-dropdown-all-link {
  font-weight: 600;
  color: var(--color-brand-primary);
  text-decoration: none;
}

.hero-dropdown-all-link:hover {
  text-decoration: underline;
}

.hero-dropdown-esc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hero-dropdown-esc kbd {
  padding: 0.1rem 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

/* Smart Quick Category Tabs & Chips */
.hero-quick-category-container {
  margin-top: 1.25rem;
}

.hero-category-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.hero-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
}

.hero-cat-tab:hover {
  color: var(--text-primary);
  border-color: var(--color-brand-primary);
  background: var(--bg-surface-subtle);
}

.hero-cat-tab.active {
  color: #ffffff;
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.chips-switching {
  opacity: 0.35;
  transform: scale(0.98);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* Quick Trending Chips */
.hero-quick-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 38px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.quick-chip:hover {
  color: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  background: var(--bg-surface-subtle);
  transform: translateY(-1px);
}

.quick-chip .chip-icon {
  font-size: 0.95rem;
  line-height: 1;
}

/* Action Buttons */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.75rem 0 3rem 0;
}

/* Horizontal Trust & Stats Bar (Modern & Polished) */
/* Horizontal Trust & Stats Bar (Clean, Minimal & Modern) */
.hero-trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  border-right: 1px solid var(--border-subtle);
  overflow: hidden;
  min-width: 0;
  transition: background var(--transition-fast);
}

.trust-item:last-child {
  border-right: none;
}

.trust-item:hover {
  background: var(--bg-surface-subtle);
}

.trust-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.trust-icon-indigo {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

.trust-icon-green {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.trust-icon-cyan {
  background: rgba(6, 182, 212, 0.1);
  color: #0891b2;
}

.trust-icon-purple {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

[data-theme="dark"] .trust-icon-indigo {
  background: rgba(99, 102, 241, 0.18);
  color: #818cf8;
}

[data-theme="dark"] .trust-icon-green {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

[data-theme="dark"] .trust-icon-cyan {
  background: rgba(6, 182, 212, 0.18);
  color: #38bdf8;
}

[data-theme="dark"] .trust-icon-purple {
  background: rgba(139, 92, 246, 0.18);
  color: #c084fc;
}

.trust-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.trust-text strong {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.stat-counter {
  font-variant-numeric: tabular-nums;
  color: inherit;
  font-weight: inherit;
}

.trust-text small {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.35;
  white-space: nowrap;
  margin-top: 2px;
}

/* Animations */
@keyframes pulseAura {
  0% { transform: translateX(-50%) scale(0.95); opacity: 0.18; }
  100% { transform: translateX(-50%) scale(1.05); opacity: 0.28; }
}

@keyframes floatSlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, 20px); }
}

@keyframes floatReverse {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-25px, 15px); }
}

@keyframes livePing {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Responsive Breakpoints */
@media (max-width: 840px) {
  .hero-trust-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.75rem;
  }
  .trust-item {
    border-right: none;
    padding: 0.55rem 0.75rem;
  }
  .spotlight-search .search-input {
    font-size: 0.95rem;
    padding: 0 2.75rem 0 2.75rem;
    height: 50px;
  }
  .spotlight-search .search-icon-pos {
    left: 0.9rem;
    width: 1.15rem;
    height: 1.15rem;
  }
  .spotlight-search .search-clear-btn {
    right: 0.85rem;
  }
  .search-shortcut-badge {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2.25rem 0.5rem 2rem 0.5rem;
  }
  .hero-badge-pill {
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
  }
  .hero-trust-bar {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0.65rem;
  }
  .trust-item {
    border-right: none;
    padding: 0.45rem 0.6rem;
    gap: 0.75rem;
  }
  .trust-icon-box {
    width: 2.25rem;
    height: 2.25rem;
  }
  .trust-text strong {
    font-size: 0.88rem;
  }
  .trust-text small {
    font-size: 0.72rem;
  }
  .hero-live-dropdown {
    max-height: 300px;
  }
  .hero-quick-chips {
    gap: 0.35rem;
  }
  .quick-chip {
    padding: 0.25rem 0.6rem;
    font-size: 0.76rem;
  }
  .hero-cat-tab {
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-glow,
  .hero-pill-pulse {
    animation: none !important;
  }
}
