/* tip spots · baa.business
   Quiet "buy us a moon latte" placements: a footer line and a lesson-end card.
   New class names only; relies on the shared brand variables (with fallbacks). */

/* 1. footer line */
a.tip-link {
  color: rgba(192, 132, 252, 0.78);
  white-space: nowrap;
  transition: color 0.2s;
}

a.tip-link:hover,
a.tip-link:focus-visible {
  color: var(--purple-bright, #c084fc);
}

.tip-cup {
  display: inline-block;
  margin-right: 0.3em;
  text-transform: none;
}

/* starlink tracker has no footer: sit at the end of its related-pages row */
.bw-back a.tip-link {
  margin-left: auto;
}

@media (max-width: 600px) {
  .bw-back a.tip-link { margin-left: 0; }
}

/* 2. lesson-end card */
.tip-card {
  max-width: min(68ch, 100%);
  margin-top: 56px;
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  background:
    radial-gradient(ellipse 60% 90% at 100% 0%, rgba(168, 85, 247, 0.08), transparent 60%),
    var(--bg-card, #12121a);
}

.tip-card-copy {
  flex: 1 1 260px;
  min-width: 0;
}

.tip-card-title {
  font-size: 1.05rem;
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: -0.01em;
  color: var(--text, #f2f2f5);
  margin: 0 0 6px;
}

.tip-card-text {
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-muted, #9a9aad);
  margin: 0;
}

.tip-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  white-space: nowrap;
  color: var(--text, #f2f2f5);
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.1);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.tip-pill:hover,
.tip-pill:focus-visible {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--purple, #a855f7);
  transform: translateY(-1px);
}

/* keep the lesson nav close to the card instead of a second big gap */
.tip-card + .lesson-footer-nav {
  margin-top: 32px;
}

@media (max-width: 480px) {
  .tip-card {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tip-pill,
  a.tip-link {
    transition: none;
  }
  .tip-pill:hover,
  .tip-pill:focus-visible {
    transform: none;
  }
}

/* 3. tip ufo (tip.js TIP_MODE = "ufo"): a silver saucer flies across on click.
   Full-viewport fixed stage that clips its contents, so an off-screen saucer
   never creates scroll overflow or shifts layout. Motion is transform/opacity. */
.tip-ufo-stage {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2147483000;
  contain: strict;
}

.tip-ufo {
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  transform: translate3d(-400px, -400px, 0); /* parked off-screen until animated */
  will-change: transform, opacity;
  pointer-events: none;
}

/* faint purple speed trail: starts at the saucer's middle and points back
   along the flight path (tip.js sets its rotation; opacity is animated) */
.tip-ufo-trail {
  position: absolute;
  left: 50%;
  top: 50%; /* + half its height = 62%, the disc's middle */
  width: 160%;
  height: 24%;
  transform-origin: 0 50%;
  border-radius: 999px;
  background: radial-gradient(ellipse 100% 50% at 0% 50%,
    rgba(233, 213, 255, 0.7), rgba(192, 132, 252, 0.4) 40%, rgba(168, 85, 247, 0) 100%);
  opacity: 0;
  pointer-events: none;
}

.tip-ufo-svg {
  position: relative; /* above the trail */
  display: block;
  transform-origin: 50% 64%;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}

.tip-ufo-light {
  animation: tip-ufo-blink 1.2s ease-in-out infinite;
}
.tip-ufo-light:nth-of-type(2) { animation-delay: -0.4s; }
.tip-ufo-light:nth-of-type(3) { animation-delay: -0.8s; }

@keyframes tip-ufo-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.15; }
}

@media (max-width: 600px) {
  .tip-ufo { width: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  .tip-ufo-light {
    animation: none;
  }
  .tip-ufo-trail {
    display: none;
  }
}

/* bigger footer tip link */
.tip-link { font-size: 1rem; font-weight: 500; letter-spacing: .01em; display: inline-block; padding: 4px 0; }
.tip-link .tip-cup { font-size: 1.15em; margin-right: 6px; }
@media (max-width: 640px) { .tip-link { font-size: 1.05rem; padding: 6px 0; } }
