/* Homepage-specific overrides */

/* Hero headline - responsive font size in rem */
#main-content .mui-8z1ffa {
  font-size: 3.5rem; /* 56px */
  line-height: 1.05;
}
/* Keep emphasized words in hero headings on Signika too (e.g. <span>superpowered</span>) */
#main-content .mui-8z1ffa span,
#main-content .heading-h1 span,
#main-content .heading-h2 span {
  font-family: var(--font-bagoss-condensed, "Signika", sans-serif);
  font-weight: inherit;
}
@media (max-width: 1199.95px) {
  #main-content .mui-8z1ffa {
    font-size: 2.75rem; /* 44px */
  }
}
@media (max-width: 598.95px) {
  #main-content .mui-8z1ffa {
    font-size: 2.25rem; /* 36px */
  }
}

/* Hero CTA row - stack buttons on mobile to prevent truncation */
.hero-cta-row {
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .hero-cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* Hero fills viewport minus header (navbar + optional top banner).
   Flexbox ensures it adapts when banner is dismissed. */
.bg-surface-secondary {
  min-height: 100vh;
  min-height: 100dvh; /* mobile: accounts for browser chrome */
}
.bg-surface-secondary > header {
  flex-shrink: 0;
}
#main-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#main-content > div:first-child {
  height: 95vh;
  height: 85dvh;
  display: flex;
}
#main-content > div:first-child > .MuiBox-root.mui-1djuixb {
  flex: 1 1 auto;
  min-height: min-content;
  height: auto;
  overflow: hidden; /* fallback for older browsers */
  overflow: clip;   /* clips overflow without scrollbar */
}

/* Hero inner content wrapper - fill hero height so cards aren't clipped */
#main-content .MuiBox-root.mui-1we15nw {
  height: 100%;
}

/* Reusable gradient text highlight for hero keywords.
   Mirrors the variable-driven am-text-gradient footer treatment. */
.am-text-gradient,
.text-gradient-brand,
.am-text-gradient-container {
  --gradient-stop1: 42.69961797718223%;
  --gradient-stop2: 95.67974211086737%;
  --gradient-posX: 38.57418678993001%;
  --gradient-posY: 54.10905274475161%;
  --gradient-color-1: #d0b2ff;
  --gradient-color-2: #ffeed8;
  --gradient-color-3: #e8400d;
  color: var(--color-purple-525, #a98bff); /* fallback when clipping unsupported */
  background-image: linear-gradient(
    92deg,
    var(--gradient-color-1) 0%,
    var(--gradient-color-2) var(--gradient-stop1),
    var(--gradient-color-3) var(--gradient-stop2)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.am-text-gradient.is-footer {
  --gradient-stop1: 41%;
  --gradient-stop2: 96%;
  position: relative;
  background-image:
    radial-gradient(
      140% 95% at var(--gradient-posX) var(--gradient-posY),
      rgba(255, 238, 216, 0.72) 0%,
      rgba(255, 238, 216, 0) 52%
    ),
    linear-gradient(
      92deg,
      #d0b2ff 0%,
      #ffeed8 var(--gradient-stop1),
      #e8400d var(--gradient-stop2)
    );
  background-size: 170% 170%;
  background-position: 46% 52%;
  filter: drop-shadow(0 0 8px rgba(255, 184, 140, 0.2));
  animation: amFooterGradientShift 4.8s ease-in-out infinite alternate,
             amFooterGlowPulse 2.4s ease-in-out infinite;
  will-change: background-position, filter;
}

/* Soft aura layer for "alive" highlight feel */
.am-text-gradient.is-footer::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  top: 58%;
  height: 42%;
  pointer-events: none;
  background: radial-gradient(
    65% 90% at 50% 50%,
    rgba(255, 238, 216, 0.34) 0%,
    rgba(208, 178, 255, 0.22) 38%,
    rgba(232, 64, 13, 0.06) 70%,
    rgba(232, 64, 13, 0) 100%
  );
  filter: blur(10px);
  transform-origin: center;
  animation: amFooterAuraPulse 2.4s ease-in-out infinite;
  z-index: -1;
}

/* Nav fallback polish for shared app shell header */
.am-nav-content-wrapper {
  font-family: var(--font-inter, "Inter", sans-serif);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

@keyframes amFooterGradientShift {
  0% {
    background-position: 36% 48%;
    background-size: 168% 168%;
  }
  100% {
    background-position: 62% 58%;
    background-size: 182% 182%;
  }
}

@keyframes amFooterGlowPulse {
  0%, 100% {
    filter: drop-shadow(0 0 7px rgba(208, 178, 255, 0.22))
            drop-shadow(0 0 11px rgba(255, 206, 160, 0.14));
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(255, 238, 216, 0.34))
            drop-shadow(0 0 16px rgba(232, 64, 13, 0.22));
  }
}

@keyframes amFooterAuraPulse {
  0%, 100% {
    opacity: 0.48;
    transform: scaleX(0.98) scaleY(0.95);
  }
  50% {
    opacity: 0.78;
    transform: scaleX(1.03) scaleY(1.04);
  }
}

/* Hero purple gradient (from v5fd design exploration) */
.hero-purple-gradient {
  background: var(--color-surface-brand-dark-purple, #201547);
  background-image: var(--color-purple-gradient, radial-gradient(175.07% 171.43% at 28.58% -31.46%, #3445c8 0%, #5f4e8e 38.14%, #9d7ba8 58.6%, #d4a8c3 74.47%, #fed 100%), #fff);
  position: relative;
  overflow: hidden;
}
.hero-purple-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(52,69,200,0.4) 0%, transparent 70%);
  pointer-events: none;
}

/* Showcase: force the same above-fold purple gradient on tagged blocks */
.showcase-page .above-fold-purple-surface,
.showcase-page .hero-purple-gradient {
  background-color: #201547 !important;
  background-image: radial-gradient(175.07% 171.43% at 28.58% -31.46%, #3445c8 0%, #5f4e8e 38.14%, #9d7ba8 58.6%, #d4a8c3 74.47%, #fed 100%), #201547 !important;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  position: relative;
  isolation: isolate;
}
.showcase-page .above-fold-purple-surface::before,
.showcase-page .hero-purple-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(52,69,200,0.4) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.showcase-page .above-fold-purple-surface > *,
.showcase-page .hero-purple-gradient > * {
  position: relative;
  z-index: 1;
}

/* Force v5fd purple gradient on requested product surfaces */
#main-content section.bg-surface-brand-dark-purple,
#main-content .MuiBox-root.mui-1djuixb.rounded-md.overflow-hidden,
#main-content .MuiBox-root.mui-1djuixb {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: #201547 !important;
  background-image: radial-gradient(175.07% 171.43% at 28.58% -31.46%, #3445c8 0%, #5f4e8e 38.14%, #9d7ba8 58.6%, #d4a8c3 74.47%, #fed 100%), #201547 !important;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  position: relative;
  isolation: isolate;
}
#main-content section.bg-surface-brand-dark-purple::before,
#main-content .MuiBox-root.mui-1djuixb.rounded-md.overflow-hidden::before,
#main-content .MuiBox-root.mui-1djuixb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(52,69,200,0.4) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
#main-content section.bg-surface-brand-dark-purple > *,
#main-content .MuiBox-root.mui-1djuixb.rounded-md.overflow-hidden > *,
#main-content .MuiBox-root.mui-1djuixb > * {
  position: relative;
  z-index: 1;
}

/* Remove top padding from archetypes section */
#main-content .mui-1quf9mf {
  padding-top: 0;
}

/* Hero logo strip: white logos at 70% opacity on dark purple */
.hero-logo-strip img {
  filter: brightness(0) invert(1) !important;
  opacity: 0.7 !important;
}

/* Hero logo strip edge gradients - explicit CSS (Tailwind arbitrary values may not be in bundle) */
.hero-logo-strip-grad-left {
  background: linear-gradient(to right, #201547 0%, rgba(32, 21, 71, 0.7) 50%, transparent 100%) !important;
}
.hero-logo-strip-grad-right {
  background: linear-gradient(to left, #201547 0%, rgba(32, 21, 71, 0.7) 50%, transparent 100%) !important;
}

/* Team section: question bubbles on image (from design exploration) */
.mui-x1gnmd {
  position: relative;
}
.fl-bubble {
  position: absolute;
  width: fit-content;
  background: white;
  border-radius: 20px;
  padding: 14px 22px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
  font-family: Signika, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a2e;
  z-index: 2;
  white-space: nowrap;
  line-height: 1.3;
}
.fl-bubble-1 {
  top: 20px;
  left: -30px;
  font-size: 14px;
  padding: 14px 22px;
}
.fl-bubble-2 {
  bottom: 30%;
  right: -10px;
}
.fl-bubble-3 {
  bottom: 6%;
  left: 5%;
  font-size: 13px;
  color: #444;
}
@media (max-width: 768px) {
  .fl-bubble {
    display: none;
  }
}

/* Remove padding-bottom from footer top links (About us, Leadership team, etc.) */
footer .mui-8qgzw2 {
  padding-bottom: 0 !important;
}

/* Fix: testimonial carousel partial slide clipping.
   .mui-1a3obve has max-width:298px but Swiper calculates slide widths to exactly
   fill the container ((1312 - 3*24) / 4 = 310px). The max-width cap makes slides
   12px narrower each, leaving ~48px of gap where the 5th slide peeks in.
   Removing max-width lets Swiper fill the container perfectly at every breakpoint. */
#g2-reviews-688 .mui-1a3obve {
  max-width: none;
}

/* Above-fold hero: stacked archetype cards (Amplemarket-style deck) */
#main-content .mui-af9veb {
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 22px 0 0 16px;
}

/* Stacked cards container - Amplemarket Duo Voice style */
#main-content .hero-stacked-cards {
  position: relative;
  width: min(72%, 356px);
  height: 340px;
  pointer-events: auto;
  z-index: 2;
  overflow: visible;
}

/* Each card in the stack - base positioning */
#main-content .hero-stacked-cards .hero-photo-overlay-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(46, 33, 96, 0.97) 0%, rgba(35, 24, 80, 0.98) 100%);
  box-shadow: 0 20px 48px rgba(17, 9, 47, 0.46);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  transform-origin: bottom center;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), z-index 0.4s step-end, opacity 0.4s ease;
  cursor: pointer;
}

/* Stacking: rotation-based fan (data-position set by JS) */
#main-content .hero-stacked-cards .hero-stacked-card[data-position="0"] {
  transform: rotate(0deg) scale(1);
  z-index: 6;
  opacity: 1;
  cursor: default;
  pointer-events: none;
}
#main-content .hero-stacked-cards .hero-stacked-card[data-position="1"] {
  transform: rotate(-3deg) translate(-8px, 4px) scale(0.97);
  z-index: 5;
  opacity: 0.6;
}
#main-content .hero-stacked-cards .hero-stacked-card[data-position="2"] {
  transform: rotate(5deg) translate(12px, 6px) scale(0.94);
  z-index: 4;
  opacity: 0.4;
}
#main-content .hero-stacked-cards .hero-stacked-card[data-position="3"] {
  transform: rotate(-4deg) translate(-6px, 10px) scale(0.91);
  z-index: 3;
  opacity: 0.25;
}
#main-content .hero-stacked-cards .hero-stacked-card[data-position="4"] {
  transform: rotate(3deg) translate(8px, 14px) scale(0.88);
  z-index: 2;
  opacity: 0.12;
}
#main-content .hero-stacked-cards .hero-stacked-card[data-position="5"] {
  transform: rotate(-2deg) translate(-4px, 18px) scale(0.85);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

/* Pager for stacked cards - hidden */
#main-content .hero-stacked-pager {
  display: none;
}

#main-content .hero-overlay-accent {
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 4px;
  border-radius: 0 8px 8px 0;
  background: var(--archetype-color, #f47a25);
}

#main-content .hero-overlay-inner {
  padding: 28px 24px 18px 28px;
}

#main-content .hero-overlay-badge {
  display: block;
  width: 120px;
  height: auto;
  object-fit: contain;
  margin-bottom: 12px;
}

#main-content .hero-overlay-eyebrow {
  margin: 0;
  font-family: var(--font-inter, "Inter", sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(224, 220, 255, 0.9);
}

#main-content .hero-overlay-title {
  margin: 12px 0 10px;
  font-family: var(--font-bagoss-condensed, "Signika", sans-serif);
  font-size: 40px;
  line-height: 0.94;
  font-weight: 600;
  color: #ffffff;
}

#main-content .hero-overlay-copy {
  margin: 0;
  max-width: 26ch;
  font-family: var(--font-inter, "Inter", sans-serif);
  font-size: 13px;
  line-height: 1.45;
  font-style: italic;
  color: rgba(237, 233, 255, 0.9);
}

#main-content .hero-overlay-divider {
  height: 1px;
  margin: 18px 0 14px;
  background: rgba(255, 255, 255, 0.14);
}

#main-content .hero-overlay-section {
  margin: 0 0 12px;
  font-family: var(--font-inter, "Inter", sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(224, 220, 255, 0.86);
}

#main-content .hero-overlay-row {
  display: grid;
  grid-template-columns: 78px 1fr 32px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: #ffffff;
}

#main-content .hero-overlay-row span {
  font-family: var(--font-bagoss-standard, "Signika", sans-serif);
  font-size: 15px;
  font-weight: 500;
}

#main-content .hero-overlay-row strong {
  font-family: var(--font-bagoss-standard, "Signika", sans-serif);
  font-size: 16px;
  font-weight: 600;
  text-align: right;
}

#main-content .hero-overlay-track {
  height: 7px;
  border-radius: 99px;
  background: rgba(166, 154, 207, 0.35);
  overflow: hidden;
}

#main-content .hero-overlay-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--archetype-color, #f47a25);
}

#main-content .hero-overlay-pager {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

#main-content .hero-overlay-pager span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(208, 198, 241, 0.45);
  cursor: pointer;
  pointer-events: auto;
}

#main-content .hero-overlay-pager span.active {
  width: 28px;
  background: #f47a25;
}

@media (max-width: 1199.95px) {
  #main-content .hero-stacked-cards {
    height: 310px;
  }

  #main-content .hero-photo-overlay-card {
    left: 12px;
    top: 14px;
    width: min(76%, 332px);
    border-radius: 22px;
  }

  #main-content .hero-overlay-inner {
    padding: 22px 18px 14px 22px;
  }

  #main-content .hero-overlay-title {
    font-size: 40px;
  }

  #main-content .hero-overlay-row {
    grid-template-columns: 68px 1fr 30px;
    gap: 8px;
    margin-bottom: 7px;
  }
}

@media (max-width: 958.95px) {
  #main-content .hero-stacked-cards {
    height: 290px;
    width: min(90%, 420px);
  }

  #main-content .hero-stacked-pager {
    width: min(90%, 420px);
  }

  #main-content .hero-photo-overlay-card {
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    max-width: none;
  }

  #main-content .hero-overlay-accent {
    top: 16px;
    bottom: 16px;
  }

  #main-content .hero-overlay-inner {
    padding: 18px 14px 12px 18px;
  }

  #main-content .hero-overlay-eyebrow,
  #main-content .hero-overlay-section {
    font-size: 10px;
  }

  #main-content .hero-overlay-title {
    margin-top: 8px;
    font-size: 40px;
  }

  #main-content .hero-overlay-copy {
    font-size: 12px;
  }

  #main-content .hero-overlay-row span {
    font-size: 13px;
  }

  #main-content .hero-overlay-row strong {
    font-size: 14px;
  }

  #main-content .hero-overlay-pager {
    display: none;
  }
}

@media (max-width: 390.95px) {
  #main-content .hero-photo-overlay-card {
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 18px;
  }

  #main-content .hero-overlay-inner {
    padding: 14px 10px 10px 14px;
  }

  #main-content .hero-overlay-row {
    grid-template-columns: 60px 1fr 24px;
    gap: 6px;
  }
}

.bf-playbook-wrap {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
}
