/**
 * Pinterest Follow — premium profile CTA card.
 * Lightweight CSS; optional fade-in via IntersectionObserver in pinterest-follow.js.
 */

.nm-pinterest-follow {
  --nm-pin-follow-rose: var(--nm-color-accent, #d4849a);
  --nm-pin-follow-nude: var(--nm-color-surface-soft, #e8c9b0);
  --nm-pin-follow-cream: var(--nm-color-bg, #faf6f1);
  --nm-pin-follow-red: #e60023;
  position: relative;
  isolation: isolate;
  margin: 1.5rem 0 0;
  padding: 2.75rem 1rem 3rem;
  overflow: hidden;
  text-align: center;
  border-radius: calc(var(--nm-radius-card, 12px) + 4px);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--nm-color-primary-soft) 35%, var(--nm-pin-follow-cream)) 0%,
      var(--nm-pin-follow-cream) 42%,
      color-mix(in srgb, var(--nm-pin-follow-nude) 28%, var(--nm-pin-follow-cream)) 100%
    );
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 450ms ease,
    transform 450ms ease;
}

.nm-pinterest-follow.is-visible {
  opacity: 1;
  transform: none;
}

.nm-pinterest-follow__heading {
  position: relative;
  z-index: 1;
  margin: 0 auto 1.5rem;
  max-width: 28rem;
  font-size: clamp(1.5rem, 3.2vw, 1.9rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--nm-color-text, #3b1a1a);
  text-align: center;
}

.nm-pinterest-follow__heading::before,
.nm-pinterest-follow__heading::after {
  display: none;
}

.nm-pinterest-follow__stage {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 0;
  width: min(34rem, 92%);
  height: 11rem;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 50%, color-mix(in srgb, var(--nm-pin-follow-nude) 55%, transparent), transparent 70%),
    radial-gradient(ellipse at 30% 60%, color-mix(in srgb, var(--nm-pin-follow-rose) 22%, transparent), transparent 65%);
  pointer-events: none;
}

.nm-pinterest-follow__decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: color-mix(in srgb, var(--nm-pin-follow-rose) 70%, var(--nm-color-border, #c4a882));
  pointer-events: none;
}

.nm-pinterest-follow__curve {
  position: absolute;
  top: 14%;
  width: clamp(5rem, 14vw, 7.5rem);
  height: auto;
  opacity: 0.38;
}

.nm-pinterest-follow__curve--left {
  left: max(0.5rem, 4%);
  animation: nm-pin-follow-float 8s ease-in-out infinite;
}

.nm-pinterest-follow__curve--right {
  right: max(0.5rem, 4%);
  animation: nm-pin-follow-float 8s ease-in-out infinite reverse;
}

.nm-pinterest-follow__dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--nm-pin-follow-rose);
  opacity: 0.45;
}

.nm-pinterest-follow__dot--1 {
  top: 24%;
  left: 16%;
}

.nm-pinterest-follow__dot--2 {
  top: 30%;
  right: 15%;
  width: 4px;
  height: 4px;
  background: var(--nm-color-border, #c4a882);
}

.nm-pinterest-follow__dot--3 {
  bottom: 22%;
  left: 20%;
  width: 4px;
  height: 4px;
}

.nm-pinterest-follow__spark {
  position: absolute;
  width: 7px;
  height: 7px;
  opacity: 0.4;
  background: var(--nm-color-border, #c4a882);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: nm-pin-follow-twinkle 3.8s ease-in-out infinite;
}

.nm-pinterest-follow__spark--1 {
  top: 20%;
  right: 22%;
}

.nm-pinterest-follow__spark--2 {
  bottom: 18%;
  right: 18%;
  animation-delay: 1.1s;
}

.nm-pinterest-follow__card {
  position: relative;
  z-index: 1;
  max-width: 24.5rem;
  margin: 0 auto;
  padding: 2.15rem 1.75rem 1.65rem;
  background: var(--nm-color-surface, #ffffff);
  border: 1px solid color-mix(in srgb, var(--nm-color-border, #c4a882) 65%, transparent);
  border-radius: calc(var(--nm-radius-card, 12px) + 6px);
  box-shadow: var(--nm-shadow-card, 0 1px 3px rgba(26, 26, 26, 0.08));
}

.nm-pinterest-follow__avatar {
  position: relative;
  width: 4.75rem;
  height: 4.75rem;
  margin: 0 auto 1.15rem;
  display: grid;
  place-items: center;
}

.nm-pinterest-follow__avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #fff 0%, transparent 42%),
    linear-gradient(145deg, #fff7f2 0%, var(--nm-pin-follow-nude) 48%, var(--nm-pin-follow-rose) 100%);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--nm-color-border, #c4a882) 55%, transparent),
    0 4px 14px color-mix(in srgb, var(--nm-color-primary, #680d3a) 10%, transparent);
}

.nm-pinterest-follow__pinterest-mark {
  position: relative;
  z-index: 1;
  width: 1.7rem;
  height: 1.7rem;
  background-color: var(--nm-pin-follow-red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.nm-pinterest-follow__name {
  margin: 0 0 0.3rem;
  font-size: clamp(1.5rem, 3.2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--nm-color-text, #3b1a1a);
  text-transform: none;
  background: none;
  padding: 0;
  max-width: none;
  width: auto;
}

.nm-pinterest-follow__name::before,
.nm-pinterest-follow__name::after {
  display: none;
}

.nm-pinterest-follow__user {
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--nm-pin-follow-rose);
}

.nm-pinterest-follow__tagline {
  margin: 0 auto 1.45rem;
  max-width: 17.5rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--nm-color-text-muted, #5c3a3a);
}

.nm-pinterest-follow__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  background: var(--nm-color-primary, #680d3a);
  color: var(--nm-color-on-primary, #faf6f1);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(59, 26, 26, 0.08);
  transition:
    background-color 150ms ease,
    transform 150ms ease;
}

.nm-pinterest-follow__cta:hover {
  background: var(--nm-color-primary-dark, #3b1a1a);
  color: var(--nm-color-on-primary, #faf6f1);
  transform: translateY(-1px);
}

.nm-pinterest-follow__cta:active {
  transform: none;
}

.nm-pinterest-follow__cta:focus-visible {
  outline: 2px solid var(--nm-color-focus, #2b6cb0);
  outline-offset: 3px;
}

.nm-pinterest-follow__cta-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

@keyframes nm-pin-follow-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes nm-pin-follow-twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.12);
  }
}

@media (max-width: 639.98px) {
  .nm-pinterest-follow {
    padding: 2rem 0.75rem 2.25rem;
  }

  .nm-pinterest-follow__curve {
    width: 3.75rem;
    opacity: 0.26;
  }

  .nm-pinterest-follow__card {
    padding: 1.75rem 1.25rem 1.35rem;
  }

  .nm-pinterest-follow__cta {
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nm-pinterest-follow,
  .nm-pinterest-follow__cta,
  .nm-pinterest-follow__curve--left,
  .nm-pinterest-follow__curve--right,
  .nm-pinterest-follow__spark {
    animation: none !important;
    transition: none !important;
  }

  .nm-pinterest-follow {
    opacity: 1;
    transform: none;
  }

  .nm-pinterest-follow__cta:hover {
    transform: none;
  }
}

/* Editor preview */
.nm-pinterest-follow--editor {
  opacity: 1;
  transform: none;
  padding: 1rem;
  border: 1px dashed var(--nm-color-border, #c4a882);
  border-radius: 12px;
}

.nm-pinterest-follow__editor-label {
  margin: 0 0 0.75rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nm-color-text-muted, #5c3a3a);
}
