/* ============================================================
   AI accent layer — dark teaser, button interactivity, glow.
   Loaded after flubb-master.css + teaser-source.css.
   ============================================================ */

/* ── Shared tokens ─────────────────────────────────────────── */
:root {
  --f-ink-deep: #010118;
  --f-ink-deep-2: #0a0824;
  --f-glow-violet: 116, 68, 242;
  --f-glow-cyan: 100, 180, 255;
}

/* ── Animated mesh keyframes (used by glow & sweep) ─────────── */
@keyframes ai-glow-drift {
  0%   { transform: translate3d(-6%, -4%, 0) scale(1);   opacity: 0.85; }
  50%  { transform: translate3d( 8%,  6%, 0) scale(1.12); opacity: 1;    }
  100% { transform: translate3d(-6%, -4%, 0) scale(1);   opacity: 0.85; }
}

@keyframes ai-glow-drift-2 {
  0%   { transform: translate3d( 5%,  6%, 0) scale(1);   opacity: 0.6; }
  50%  { transform: translate3d(-7%, -8%, 0) scale(1.18); opacity: 0.9; }
  100% { transform: translate3d( 5%,  6%, 0) scale(1);   opacity: 0.6; }
}

@keyframes ai-border-rotate {
  to { --ai-border-angle: 360deg; }
}

@property --ai-border-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* ============================================================
   Section 1 — Dark teaser ("mockup" card on home)
   ============================================================ */

.fm-teaser {
  background: transparent;
}

.fm-teaser-card {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(var(--f-glow-violet), 0.18) 0%, transparent 55%),
    radial-gradient(80% 60% at 100% 100%, rgba(var(--f-glow-cyan), 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #0a0824 0%, var(--f-ink-deep) 60%, #000010 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 30px 80px rgba(2, 2, 24, 0.45),
    0 8px 30px rgba(116, 68, 242, 0.12);
  overflow: hidden;
  isolation: isolate;
}

/* Animated gradient border ring */
.fm-teaser-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--ai-border-angle, 0deg),
    rgba(116, 68, 242, 0.55),
    rgba(100, 180, 255, 0.25),
    rgba(255, 255, 255, 0.05),
    rgba(116, 68, 242, 0.55)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
  animation: ai-border-rotate 9s linear infinite;
  z-index: 0;
}

/* Animated radial glow behind phone */
.fm-teaser-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  height: 120%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(closest-side, rgba(116, 68, 242, 0.35) 0%, transparent 70%),
    radial-gradient(closest-side at 30% 40%, rgba(100, 180, 255, 0.18) 0%, transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: ai-glow-drift 14s ease-in-out infinite;
}

/* Subtle dot grid overlay */
.fm-teaser-card > * { position: relative; z-index: 1; }

.fm-teaser-card::after,
.fm-teaser-card::before { will-change: transform; }

.fm-teaser-card {
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(120% 80% at 50% 0%, rgba(var(--f-glow-violet), 0.18) 0%, transparent 55%),
    radial-gradient(80% 60% at 100% 100%, rgba(var(--f-glow-cyan), 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #0a0824 0%, var(--f-ink-deep) 60%, #000010 100%);
  background-size: 22px 22px, auto, auto, auto;
  background-position: 0 0, center, center, center;
}

/* Text recoloring */
.fm-teaser-card .fm-teaser-eyebrow,
.fm-teaser-card .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.fm-teaser-card .eyebrow-dot {
  background: #a98bff;
  box-shadow: 0 0 0 4px rgba(169, 139, 255, 0.18);
}

.fm-teaser-card .fm-teaser-title {
  color: #ffffff;
  text-shadow: 0 1px 30px rgba(116, 68, 242, 0.25);
}

.fm-teaser-card .fm-teaser-title em {
  color: #b59cff;
  font-style: italic;
  background: linear-gradient(90deg, #b59cff 0%, #7cc9ff 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  padding-right: 0.12em;
  margin-right: -0.04em;
}

.fm-teaser-card .fm-teaser-sub,
.fm-teaser-card .fm-teaser-launching,
.fm-teaser-card .fm-teaser-features li {
  color: rgba(255, 255, 255, 0.68);
}

.fm-teaser-card .fm-teaser-features li::before,
.fm-teaser-card .fm-teaser-features svg {
  color: #a98bff;
  stroke: #a98bff;
}

/* Feature list — white default, purple on active/hover */
.fm-teaser-card .fm-teaser-features li {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.fm-teaser-card .fm-feat-label {
  color: #ffffff;
  transition: color 0.25s ease;
}

.fm-teaser-card .fm-teaser-features li:hover .fm-feat-label {
  color: #b59cff;
  opacity: 1;
}

.fm-teaser-card .fm-teaser-features li.is-active .fm-feat-label {
  color: #b59cff;
}

/* Icon tile — glassy on dark, glow when active */
.fm-teaser-card .fm-feat-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.fm-teaser-card .fm-teaser-features li:hover .fm-feat-icon {
  background: rgba(116, 68, 242, 0.15);
  border-color: rgba(181, 156, 255, 0.4);
}

.fm-teaser-card .fm-teaser-features li.is-active .fm-feat-icon {
  background: linear-gradient(135deg, rgba(116, 68, 242, 0.30) 0%, rgba(100, 180, 255, 0.18) 100%);
  border-color: rgba(181, 156, 255, 0.55);
  box-shadow:
    0 0 0 4px rgba(116, 68, 242, 0.12),
    0 6px 18px rgba(116, 68, 242, 0.35);
}

/* Countdown / number pills, if any */
.fm-teaser-card .fm-teaser-countdown,
.fm-teaser-card .fm-teaser-countdown * {
  color: #ffffff;
}

/* Teaser CTA → glowing AI variant */
.fm-teaser-card .fm-teaser-cta {
  background: linear-gradient(135deg, #7444f2 0%, #a98bff 100%);
  color: #ffffff !important;
  box-shadow:
    0 6px 20px rgba(116, 68, 242, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.fm-teaser-card .fm-teaser-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.fm-teaser-card .fm-teaser-cta:hover::before { transform: translateX(120%); }

.fm-teaser-card .fm-teaser-cta:hover {
  box-shadow:
    0 10px 28px rgba(116, 68, 242, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

/* Phone frame: tighter contrast on dark */
.fm-teaser-card .fm-teaser-center,
.fm-teaser-card .fm-phone,
.fm-teaser-card [class*="phone"] {
  filter: drop-shadow(0 30px 60px rgba(116, 68, 242, 0.35));
}

/* Cursor-aware 3D tilt + ambient sheen on the phone */
.fm-teaser-card .fm-teaser-center {
  perspective: 1200px;
  perspective-origin: 50% 50%;
}

.fm-teaser-card .fm-phone-shell {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.fm-teaser-card.is-tilting .fm-phone-shell {
  transition: transform 0.12s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Sheen overlay that tracks pointer */
.fm-teaser-card .fm-phone-shell::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 36px;
  background: radial-gradient(
    180px circle at var(--sheen-x, 50%) var(--sheen-y, 50%),
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.06) 25%,
    transparent 55%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
  z-index: 5;
}

.fm-teaser-card.is-tilting .fm-phone-shell::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .fm-teaser-card .fm-phone-shell {
    transform: none !important;
    transition: none;
  }
  .fm-teaser-card .fm-phone-shell::after { display: none; }
}

/* ============================================================
   Section 2 — Global button interactivity
   (sweep + soft glow + lift)
   ============================================================ */

.btn-primary,
.btn-outline,
.btn-white,
.btn-outline-white,
.nav-cta,
.nav-mobile__cta,
.fm-cta-btn,
.fm-faq-cta,
.fm-steps-cta,
.subpage-cta-banner__cta,
.flubb-wwd__cta,
.card__cta,
.fi__cta,
.fm-cta-link {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

/* Sweep highlight */
.btn-primary::before,
.btn-outline::before,
.btn-white::before,
.btn-outline-white::before,
.nav-cta::before,
.nav-mobile__cta::before,
.fm-cta-btn::before,
.fm-faq-cta::before,
.fm-steps-cta::before,
.subpage-cta-banner__cta::before,
.flubb-wwd__cta::before,
.card__cta::before,
.fi__cta::before,
.fm-cta-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 25%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 75%
  );
  transform: translateX(-130%);
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

.btn-primary:hover::before,
.btn-outline:hover::before,
.btn-white:hover::before,
.btn-outline-white:hover::before,
.nav-cta:hover::before,
.nav-mobile__cta:hover::before,
.fm-cta-btn:hover::before,
.fm-faq-cta:hover::before,
.fm-steps-cta:hover::before,
.subpage-cta-banner__cta:hover::before,
.flubb-wwd__cta:hover::before,
.card__cta:hover::before,
.fi__cta:hover::before,
.fm-cta-link:hover::before {
  transform: translateX(130%);
}

/* Sweep on outline buttons should sit over the fill, not under */
.btn-outline > *,
.btn-outline-white > *,
.btn-primary > *,
.btn-white > *,
.nav-cta > *,
.nav-mobile__cta > *,
.fm-cta-btn > *,
.fm-faq-cta > *,
.fm-steps-cta > *,
.subpage-cta-banner__cta > *,
.flubb-wwd__cta > *,
.card__cta > *,
.fi__cta > *,
.fm-cta-link > * {
  position: relative;
  z-index: 2;
}

/* Soft glow halo on hover */
.btn-primary:hover {
  box-shadow:
    0 10px 28px rgba(116, 68, 242, 0.42),
    0 0 0 4px rgba(116, 68, 242, 0.10);
  transform: translateY(-2px);
}

.btn-outline:hover {
  box-shadow:
    0 8px 22px rgba(116, 68, 242, 0.28),
    0 0 0 4px rgba(116, 68, 242, 0.08);
  transform: translateY(-2px);
}

.btn-white:hover {
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.22),
    0 0 0 4px rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.btn-outline-white {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-outline-white:hover {
  box-shadow:
    0 8px 22px rgba(255, 255, 255, 0.18),
    0 0 0 4px rgba(255, 255, 255, 0.10);
  transform: translateY(-2px);
}

.nav-cta:hover {
  box-shadow:
    0 8px 22px rgba(116, 68, 242, 0.35),
    0 0 0 4px rgba(116, 68, 242, 0.10);
  transform: translateY(-1px);
}

/* Active press */
.btn-primary:active,
.btn-outline:active,
.btn-white:active,
.btn-outline-white:active,
.nav-cta:active,
.fm-cta-btn:active,
.fm-faq-cta:active,
.fm-steps-cta:active,
.subpage-cta-banner__cta:active {
  transform: translateY(0);
  transition-duration: 0.08s;
}

/* Focus ring (a11y) */
.btn-primary:focus-visible,
.btn-outline:focus-visible,
.btn-white:focus-visible,
.btn-outline-white:focus-visible,
.nav-cta:focus-visible,
.fm-cta-btn:focus-visible,
.fm-faq-cta:focus-visible,
.fm-steps-cta:focus-visible,
.subpage-cta-banner__cta:focus-visible {
  outline: 2px solid rgba(116, 68, 242, 0.7);
  outline-offset: 3px;
}

/* ============================================================
   Section 3 — Subtle AI accents elsewhere
   (light-touch — does not change content layout)
   ============================================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .fm-teaser-card::before,
  .fm-teaser-card::after { animation: none; }
  .btn-primary,
  .btn-outline,
  .btn-white,
  .btn-outline-white,
  .nav-cta { transition: none; }
}

/* ── Launching-soon store pills (App Store + Google Play) ───── */
.fm-teaser-stores {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.fm-stores-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.fm-stores-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a98bff;
  box-shadow: 0 0 0 4px rgba(169, 139, 255, 0.18);
  animation: ai-pulse 2.4s ease-in-out infinite;
}

@keyframes ai-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(169, 139, 255, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(169, 139, 255, 0.05); }
}

.fm-stores-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fm-store-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #ffffff;
  text-decoration: none;
  font-family: inherit;
  cursor: default;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  user-select: none;
}

.fm-store-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.16) 50%,
    transparent 70%
  );
  transform: translateX(-130%);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}

.fm-store-pill:hover::before { transform: translateX(130%); }

.fm-store-pill:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(181, 156, 255, 0.45);
  transform: translateY(-1px);
  box-shadow:
    0 8px 22px rgba(2, 2, 24, 0.45),
    0 0 0 4px rgba(116, 68, 242, 0.10);
}

.fm-store-pill > * { position: relative; z-index: 1; }

.fm-store-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.fm-store-icon--apple { color: #ffffff; margin-top: -2px; }

.fm-store-pill-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.fm-store-pill-text small {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 1px;
}

.fm-store-pill-text strong {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

@media (max-width: 720px) {
  .fm-stores-row { gap: 8px; }
  .fm-store-pill { padding: 8px 14px 8px 11px; }
  .fm-store-pill-text strong { font-size: 0.82rem; }
}

/* ── Big waitlist stat (gradient number) ───────────────────── */
.fm-stat {
  padding: clamp(72px, 10vw, 140px) 24px;
  background: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.fm-stat-inner {
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
}

.fm-stat-eyebrow,
.fm-stat-sub {
  font-family: 'F37 Moon', sans-serif;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  font-weight: 500;
  color: #1e1630;
  letter-spacing: 0.01em;
  margin: 0;
}

.fm-stat-eyebrow { margin-bottom: 14px; }

.fm-stat-sub {
  margin-top: 14px;
  color: #5b537a;
}

.fm-stat-number {
  font-family: 'F37 Moon', sans-serif;
  font-size: clamp(4.5rem, 16vw, 13rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 0.95;
  margin: 0;
  background: linear-gradient(
    90deg,
    #BEC8F9 0%,
    #7444F2 45%,
    #5830D4 100%
  );
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 0.06em;
}

.fm-stat-digit {
  display: inline-block;
  background: linear-gradient(
    90deg,
    #BEC8F9 0%,
    #7444F2 45%,
    #5830D4 100%
  );
  background-size: var(--bg-size, 600%) 100%;
  background-position: var(--bg-pos, 0%) 50%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(-0.5em);
  transition:
    opacity 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i, 0) * 90ms),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i, 0) * 90ms);
  will-change: transform, opacity;
}

.fm-stat-number.is-revealed .fm-stat-digit {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .fm-stat-number { font-size: clamp(3.4rem, 18vw, 6rem); }
}

/* ── Mood circle icons — larger fill, same circles ────────── */
.fm-mood-circle img {
  width: 92%;
  height: 92%;
}

/* Anchor edge circles inward so hover/selected scale doesn't overflow the phone screen */
.fm-mood-circle:first-child  { transform-origin: left center; }
.fm-mood-circle:last-child   { transform-origin: right center; }

/* ── Small-screen tweaks for dark teaser ─────────────────── */
@media (max-width: 720px) {
  .fm-teaser-card {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 18px 40px rgba(2, 2, 24, 0.45);
  }
  .fm-teaser-card::after {
    width: 110%;
    height: 80%;
  }
}
