/*
 * Mapply profile showcase finishing layer
 * Kept separate so the existing hero motion and app-screen code remain untouched.
 */

body.mapply-v4 .hero-overview-v4,
body.mapply-v4 .hero-overview-v4 > *,
body.mapply-v4 .hero-profile-showcase-v5,
body.mapply-v4 .hero-profile-track-v5,
body.mapply-v4 .hero-profile-card-v5 {
  min-width: 0;
}

body.mapply-v4 .hero-profile-showcase-v5 {
  position: relative;
  isolation: isolate;
  grid-column: 1 / -1;
  overflow: hidden;
  padding: clamp(18px, 2.1vw, 30px);
  border: 1px solid rgba(89, 143, 214, .24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 94% 8%, rgba(66, 133, 244, .13), transparent 27%),
    radial-gradient(circle at 4% 96%, rgba(249, 171, 0, .10), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, .99), rgba(246, 250, 255, .98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .92),
    0 18px 45px rgba(18, 65, 124, .10);
}

body.mapply-v4 .hero-profile-showcase-v5::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -50px;
  top: 38px;
  width: 330px;
  height: 120px;
  border-top: 3px dashed rgba(66, 133, 244, .12);
  border-radius: 50%;
  transform: rotate(-8deg);
  pointer-events: none;
}

body.mapply-v4 .hero-profile-heading-v5 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

body.mapply-v4 .hero-profile-eyebrow-v5 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 8px 12px;
  border: 1px solid #d7e7ff;
  border-radius: 999px;
  color: #1766d7;
  background: rgba(244, 249, 255, .92);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .09em;
  line-height: 1;
  text-transform: uppercase;
}

body.mapply-v4 .hero-profile-eyebrow-v5 img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

body.mapply-v4 .hero-profile-eyebrow-v5 img:last-child {
  width: 20px;
  height: 20px;
}

body.mapply-v4 .hero-profile-eyebrow-v5 span {
  min-width: 0;
}

body.mapply-v4 .hero-profile-heading-v5 h2,
body.mapply-v4 .hero-profile-heading-v5 p {
  margin: 0;
}

body.mapply-v4 .hero-profile-heading-v5 h2 {
  color: #061d43;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.08;
  text-wrap: balance;
}

body.mapply-v4 .hero-profile-heading-v5 p {
  margin-top: 5px;
  color: #637796;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.45;
}

body.mapply-v4 .hero-profile-swipe-v5 {
  display: none;
  color: #6b7d98;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

body.mapply-v4 .hero-profile-track-v5 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

body.mapply-v4 .hero-profile-card-v5 {
  --level-color: #f9ab00;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 258px;
  padding: 22px 17px 16px;
  border: 1px solid #dce7f5;
  border-radius: 22px;
  color: #102f57;
  background:
    radial-gradient(circle at 50% 112%, color-mix(in srgb, var(--level-color) 13%, transparent), transparent 52%),
    linear-gradient(160deg, #fff 0%, #fdfefe 65%, #f7faff 100%);
  box-shadow:
    inset 0 3px 0 color-mix(in srgb, var(--level-color) 88%, white),
    0 12px 28px rgba(25, 68, 119, .10);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

body.mapply-v4 .hero-profile-card-v5::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(66, 133, 244, .04), transparent 36%),
    radial-gradient(circle at 86% 14%, color-mix(in srgb, var(--level-color) 10%, transparent), transparent 24%);
  pointer-events: none;
}

body.mapply-v4 .hero-profile-card-v5.level-6 { --level-color: #34a853; }
body.mapply-v4 .hero-profile-card-v5.level-7 { --level-color: #4285f4; }
body.mapply-v4 .hero-profile-card-v5.level-8 { --level-color: #a56bff; }

@media (hover: hover) {
  body.mapply-v4 .hero-profile-card-v5:hover {
    z-index: 1;
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--level-color) 43%, #dce7f5);
    box-shadow:
      inset 0 3px 0 color-mix(in srgb, var(--level-color) 88%, white),
      0 16px 30px rgba(25, 68, 119, .14);
  }
}

body.mapply-v4 .hero-profile-person-v5 {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

body.mapply-v4 .hero-profile-photo-v5 {
  position: relative;
  display: block;
  width: 82px;
  height: 82px;
  margin-bottom: 14px;
}

body.mapply-v4 .hero-profile-photo-v5 > img:first-child {
  display: block;
  width: 100%;
  height: 100%;
  border: 3px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 7px 17px rgba(20, 57, 102, .17);
}

body.mapply-v4 .hero-profile-photo-v5 .hero-profile-badge-v5 {
  position: absolute;
  right: -4px;
  bottom: -3px;
  display: block;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 4px 10px rgba(20, 57, 102, .20);
}

body.mapply-v4 .hero-profile-person-v5 > span:last-child,
body.mapply-v4 .hero-profile-person-v5 strong,
body.mapply-v4 .hero-profile-person-v5 small {
  display: block;
}

body.mapply-v4 .hero-profile-person-v5 strong {
  max-width: 100%;
  overflow: hidden;
  color: #123d68;
  font-size: clamp(1rem, 1.1vw, 1.14rem);
  font-weight: 850;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mapply-v4 .hero-profile-person-v5 small {
  margin-top: 5px;
  color: #b87400;
  font-size: clamp(.68rem, .72vw, .76rem);
  font-weight: 800;
  letter-spacing: .015em;
  line-height: 1.28;
}

body.mapply-v4 .hero-profile-stats-v5 {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: auto 0 0;
  padding-top: 17px;
  border-top: 1px solid rgba(210, 222, 238, .82);
}

body.mapply-v4 .hero-profile-stats-v5 div {
  position: relative;
  min-width: 0;
  padding: 0 7px;
  text-align: center;
}

body.mapply-v4 .hero-profile-stats-v5 div + div {
  border-left: 1px solid rgba(208, 220, 235, .92);
}

body.mapply-v4 .hero-profile-stats-v5 dt,
body.mapply-v4 .hero-profile-stats-v5 dd {
  margin: 0;
}

body.mapply-v4 .hero-profile-stats-v5 dt {
  color: #9b6800;
  font-size: clamp(1.12rem, 1.3vw, 1.34rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1;
}

body.mapply-v4 .hero-profile-stats-v5 dd {
  margin-top: 6px;
  color: #6b7f99;
  font-size: clamp(.55rem, .58vw, .64rem);
  font-weight: 850;
  letter-spacing: .02em;
  line-height: 1.15;
  text-transform: uppercase;
}

body.mapply-v4 .hero-profile-note-v5 {
  margin: 12px 2px 0;
  color: #7385a1;
  font-size: .68rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
}

@media (max-width: 1100px) {
  body.mapply-v4 .nav-toggle {
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  body.mapply-v4 .nav-toggle svg {
    display: block;
    width: 22px !important;
    max-width: 22px !important;
    height: 22px !important;
    max-height: 22px !important;
  }

  body.mapply-v4 .nav-toggle .menu-close-icon {
    display: none !important;
  }

  body.mapply-v4 .nav-toggle[aria-expanded="true"] .menu-open-icon {
    display: none !important;
  }

  body.mapply-v4 .nav-toggle[aria-expanded="true"] .menu-close-icon {
    display: block !important;
  }

  body.mapply-v4 .primary-navigation {
    position: fixed !important;
    top: 64px !important;
    right: 11px !important;
    left: 11px !important;
    z-index: 1100 !important;
    display: grid !important;
    gap: 4px !important;
    padding: 14px !important;
    border: 1px solid rgba(158, 192, 236, .72) !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, .985) !important;
    box-shadow: 0 20px 48px rgba(25, 67, 121, .18) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-8px) !important;
  }

  body.mapply-v4 .primary-navigation.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  body.mapply-v4 .hero-profile-heading-v5 {
    grid-template-columns: auto minmax(0, 1fr);
  }

  body.mapply-v4 .hero-profile-track-v5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) and (min-width: 721px) {
  body.mapply-v4 .hero-profile-track-v5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  /* Keep the compact navigation in one row. Earlier finishing layers use
     different menu layouts; these final guards prevent their icons and links
     from escaping the header at phone widths. */
  html body.mapply-v4 .site-header[data-site-header] .header-inner,
  html body.mapply-v4 .site-header[data-site-header].is-scrolled .header-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 40px !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 50px !important;
    padding: 5px 10px !important;
  }

  body.mapply-v4 .nav-toggle {
    display: grid !important;
    grid-column: 2 !important;
    place-items: center !important;
    overflow: hidden !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
  }

  body.mapply-v4 .nav-toggle svg {
    display: block;
    width: 22px !important;
    max-width: 22px !important;
    height: 22px !important;
    max-height: 22px !important;
  }

  body.mapply-v4 .nav-toggle .menu-close-icon {
    display: none !important;
  }

  body.mapply-v4 .nav-toggle[aria-expanded="true"] .menu-open-icon {
    display: none !important;
  }

  body.mapply-v4 .nav-toggle[aria-expanded="true"] .menu-close-icon {
    display: block !important;
  }

  body.mapply-v4 .primary-navigation {
    position: fixed !important;
    top: 56px !important;
    right: 8px !important;
    left: 8px !important;
    z-index: 1100 !important;
    display: grid !important;
    gap: 4px !important;
    padding: 12px !important;
    border: 1px solid rgba(158, 192, 236, .72) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, .985) !important;
    box-shadow: 0 20px 48px rgba(25, 67, 121, .18) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-8px) !important;
  }

  body.mapply-v4 .primary-navigation.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  html,
  body.mapply-v4 {
    max-width: 100%;
    overflow-x: clip;
  }

  body.mapply-v4 .hero-overview-v4 > .hero-profile-showcase-v5 {
    order: 3;
  }

  body.mapply-v4 .hero-profile-showcase-v5 {
    width: 100%;
    padding: 17px 0 16px;
    border-radius: 21px;
  }

  body.mapply-v4 .hero-profile-showcase-v5::before {
    right: -130px;
    opacity: .65;
  }

  body.mapply-v4 .hero-profile-heading-v5 {
    position: relative;
    display: block;
    margin: 0 15px 14px;
    padding-bottom: 20px;
  }

  body.mapply-v4 .hero-profile-eyebrow-v5 {
    max-width: 100%;
    margin-bottom: 10px;
    padding: 7px 10px;
    font-size: .57rem;
    letter-spacing: .065em;
  }

  body.mapply-v4 .hero-profile-heading-v5 h2 {
    max-width: 100%;
    font-size: clamp(1.35rem, 6.4vw, 1.75rem);
    line-height: 1.02;
  }

  body.mapply-v4 .hero-profile-heading-v5 p {
    margin-top: 6px;
    font-size: .78rem;
    line-height: 1.45;
  }

  body.mapply-v4 .hero-profile-swipe-v5 {
    position: absolute;
    right: 0;
    bottom: 0;
    display: inline-flex;
  }

  body.mapply-v4 .hero-profile-track-v5 {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 15px 14px;
    scroll-padding-inline: 15px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body.mapply-v4 .hero-profile-track-v5::-webkit-scrollbar {
    display: none;
  }

  body.mapply-v4 .hero-profile-card-v5 {
    flex: 0 0 min(80vw, 300px);
    min-height: 252px;
    padding: 21px 15px 15px;
    border-radius: 22px;
    scroll-snap-align: center;
  }

  body.mapply-v4 .hero-profile-photo-v5 {
    width: 80px;
    height: 80px;
    margin-bottom: 13px;
  }

  body.mapply-v4 .hero-profile-photo-v5 .hero-profile-badge-v5 {
    width: 31px;
    height: 31px;
  }

  body.mapply-v4 .hero-profile-person-v5 strong {
    font-size: 1.08rem;
  }

  body.mapply-v4 .hero-profile-stats-v5 {
    margin-top: auto;
    padding-top: 16px;
  }

  body.mapply-v4 .hero-profile-stats-v5 dt {
    font-size: 1.22rem;
  }

  body.mapply-v4 .hero-profile-stats-v5 dd {
    font-size: .57rem;
  }

  body.mapply-v4 .hero-profile-note-v5 {
    margin: 0 15px;
    text-align: left;
  }

  body.mapply-v4 .hero-copy-v4 h1,
  body.mapply-v4 .hero-profile-heading-v5 h2 {
    overflow-wrap: normal;
    word-break: normal;
  }
}

@media (max-width: 380px) {
  body.mapply-v4 .hero-profile-card-v5 {
    flex-basis: calc(100vw - 52px);
  }

  body.mapply-v4 .hero-profile-swipe-v5 {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mapply-v4 .hero-profile-card-v5 {
    transition: none;
  }
}
