/* Theme-adaptive logo switching */
[data-md-color-scheme="default"] .only-dark {
  display: none !important;
}

[data-md-color-scheme="default"] .only-light {
  display: inline-block !important;
}

[data-md-color-scheme="slate"] .only-light {
  display: none !important;
}

[data-md-color-scheme="slate"] .only-dark {
  display: inline-block !important;
}

/* ==========================================================================
   Hero Section Enhancements
   ========================================================================== */
.hero-container {
  position: relative;
  text-align: center;
  padding: 3.5rem 1.5rem 4rem 1.5rem;
  margin-bottom: 3.5rem;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.12) 0%, rgba(103, 58, 183, 0.03) 60%, transparent 80%);
  border: 1px solid var(--md-default-fg-color--lightest);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

[data-md-color-scheme="slate"] .hero-container {
  background: radial-gradient(circle at 50% 0%, rgba(156, 107, 255, 0.14) 0%, rgba(124, 58, 237, 0.04) 60%, transparent 80%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.35);
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.15rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-radius: 9999px;
  background: rgba(124, 58, 237, 0.09);
  color: var(--md-primary-fg-color);
  border: 1px solid rgba(124, 58, 237, 0.22);
  margin-bottom: 1.5rem;
  transition: all 0.25s ease;
}

.hero-pill-badge:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.4);
}

.hero-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffb300;
  box-shadow: 0 0 0 0 rgba(255, 179, 0, 0.7);
  animation: pulse-ring 2s infinite;
  display: inline-block;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(255, 179, 0, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(255, 179, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 179, 0, 0); }
}

.hero-title {
  font-size: 2.85rem !important;
  font-weight: 850 !important;
  line-height: 1.18 !important;
  letter-spacing: -0.03em !important;
  margin: 0 0 1.25rem 0 !important;
  background: linear-gradient(135deg, #371077 0%, #7c4dff 50%, #e65100 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-md-color-scheme="slate"] .hero-title {
  background: linear-gradient(135deg, #ffffff 10%, #b388ff 60%, #ffd54f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--md-default-fg-color);
  margin: 0 auto 0.85rem auto;
  max-width: 700px;
  line-height: 1.45;
}

.hero-intro {
  font-size: 1.05rem;
  opacity: 0.88;
  max-width: 680px;
  margin: 0 auto 2.25rem auto;
  line-height: 1.65;
}

/* Hero Action Buttons */
.btn-primary-gradient {
  background: linear-gradient(135deg, #673ab7 0%, #512da8 100%) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 600 !important;
  padding: 0.75rem 2.25rem !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 20px -4px rgba(103, 58, 183, 0.45) !important;
  transition: all 0.25s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.btn-primary-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(103, 58, 183, 0.6) !important;
}

.btn-secondary-ghost {
  border: 1px solid var(--md-default-fg-color--lighter) !important;
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(8px);
  font-weight: 600 !important;
  padding: 0.75rem 2.25rem !important;
  border-radius: 10px !important;
  color: var(--md-default-fg-color) !important;
  transition: all 0.25s ease !important;
}

[data-md-color-scheme="slate"] .btn-secondary-ghost {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--md-default-fg-color) !important;
}

.btn-secondary-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--md-primary-fg-color) !important;
  color: var(--md-primary-fg-color) !important;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-intro-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--md-primary-fg-color);
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Cards Modernization
   ========================================================================== */
.grid.cards > ul > li {
  border-radius: 14px !important;
  border: 1px solid var(--md-default-fg-color--lightest) !important;
  padding: 1.6rem !important;
  background: var(--md-default-bg-color);
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease !important;
}

.grid.cards > ul > li:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(124, 58, 237, 0.35) !important;
  box-shadow: 0 16px 32px -8px rgba(103, 58, 183, 0.12) !important;
}

[data-md-color-scheme="slate"] .grid.cards > ul > li {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px -3px rgba(0, 0, 0, 0.3);
}

[data-md-color-scheme="slate"] .grid.cards > ul > li:hover {
  border-color: rgba(156, 107, 255, 0.45) !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6) !important;
}

.grid.cards > ul > li > hr {
  margin: 0.85rem 0 1rem 0 !important;
  border-color: var(--md-default-fg-color--lightest) !important;
  opacity: 0.5;
}

.grid.cards .twemoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0.35rem;
  border-radius: 9px;
  background: rgba(103, 58, 183, 0.1);
  color: var(--md-primary-fg-color);
  margin-right: 0.45rem;
  vertical-align: middle;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.grid.cards > ul > li:hover .twemoji {
  transform: scale(1.08);
  background: rgba(103, 58, 183, 0.16);
}

[data-md-color-scheme="slate"] .grid.cards .twemoji {
  background: rgba(156, 107, 255, 0.15);
  color: #b388ff;
}

[data-md-color-scheme="slate"] .grid.cards > ul > li:hover .twemoji {
  background: rgba(156, 107, 255, 0.25);
}

/* ==========================================================================
   Closing CTA Banner
   ========================================================================== */
.cta-banner {
  text-align: center;
  margin: 4.5rem 0 2.5rem 0;
  padding: 3.5rem 2rem;
  background: linear-gradient(135deg, rgba(103, 58, 183, 0.09) 0%, rgba(255, 179, 0, 0.06) 100%);
  border: 1px solid rgba(103, 58, 183, 0.22);
  border-radius: 20px;
  box-shadow: 0 16px 36px -10px rgba(103, 58, 183, 0.1);
  position: relative;
  overflow: hidden;
}

[data-md-color-scheme="slate"] .cta-banner {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(255, 179, 0, 0.07) 100%);
  border-color: rgba(156, 107, 255, 0.28);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.4);
}

.cta-banner h2 {
  font-size: 2.25rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em !important;
  margin: 0 0 1.25rem 0 !important;
}

/* ==========================================================================
   Gated developer docs bar (overrides/main.html, only on mkdocs.developers.yml)
   ========================================================================== */
.gated-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.gated-bar__signout {
  font-weight: 600;
  text-decoration: underline;
}
