/* mascot.css — watercolor-Pip section mascots.
   Transparent animated WebP over a still poster base; no blend mode needed. */

:root {
  --mascot-fade: 800ms; /* keep in sync with FADE_MS in mascot.js */
}

/* --- Mount engine ------------------------------------------------------ */
/* The poster <img> is in-flow and defines the mount's box. The animated layer
   stacks absolutely on top and cross-fades via opacity. :where() keeps the base
   at zero specificity so a positioning class on the mount still wins; the mount
   is a containing block either way. */
:where(.mascot-mount) {
  position: relative;
  line-height: 0;
}

.mascot-mount > .mascot-poster {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity var(--mascot-fade) ease;
}

/* Once the video is playing, fade the still poster out — otherwise the moving
   dog ghosts against the static one where the alpha is transparent. */
.mascot-mount > .mascot-poster.is-hidden {
  opacity: 0;
}

.mascot-mount > .mascot-anim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity var(--mascot-fade) ease;
  pointer-events: none;
}

.mascot-mount > .mascot-anim.is-shown {
  opacity: 1;
}

/* --- Hero: big Pip asking the question, speech bubble from his mouth --- */
.demo-ask {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 2px 0 16px;
}

.demo-ask-pip {
  width: 118px;
  height: 118px;
  flex: 0 0 auto;
  margin-left: -12px;
}

/* The question becomes a speech bubble with a tail pointing at Pip's mouth. */
.demo-ask .demo-question {
  margin: 0;
  max-width: none;
  font-size: 21px;
  line-height: 1.12;
  background: var(--surface-raised, #fff);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 20px 20px 20px 7px;
  padding: 13px 16px;
  position: relative;
}

.demo-ask .demo-question::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--surface-raised, #fff);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 0 4px;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

/* --- Size overrides (loaded after landing.css; the watercolor marks need
   more room than the old flat icon to read as a dog) ------------------- */

/* Nav + footer wordmark — bigger dog, and ~half the gap to the "Pip" text */
.wordmark {
  gap: 0;
}
.wordmark .pip {
  width: 80px;
  height: 72px;
  margin-right: -8px;
}
/* Footer wordmark dog — larger than the nav */
.footer-brand .wordmark .pip {
  width: 112px;
  height: 102px;
  margin-right: -12px;
}

/* "Pip typing…" reply avatar in the moments section — crop to the face and
   centre it in the circle (the full-body still sits low otherwise). */
.moment--pip .reply-avatar {
  width: 70px;
  height: 70px;
  overflow: hidden;
}
.moment--pip .reply-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  transform: scale(1.25);
}

/* Science timeline "Today" mark */
.sci-pip {
  width: 104px;
  height: 100px;
}

/* Founder-note inline marks */
.note-body .pip-inline {
  width: 2.2em;
  height: 2em;
  vertical-align: -0.7em;
}

/* How-it-works + final mounts (journey-lead, final CTA) */
.pip-lg {
  width: 172px;
  height: 172px;
}

/* --- Voice section: simple player with meditating Pip ----------------- */
.voice-player-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding: 16px 20px 8px;
}

.vps-pip {
  width: 210px;
  height: 210px;
  flex: 0 0 auto;
}

.vps-play {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px; /* optically centre the play triangle */
  box-shadow: 0 16px 36px -10px var(--accent), 0 2px 6px rgba(60, 50, 30, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.vps-play:hover {
  transform: scale(1.06);
}
.vps-play:active {
  transform: scale(0.98);
}
.vps-play.is-playing {
  padding-left: 0;
}

.vps-tag {
  margin: 0;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* How-it-works: bring the "I'll walk you through it" bubble up to Pip's mouth
   (was bottom-right and detached) with a tail pointing back at him. */
.journey-lead {
  align-items: center;
  gap: 6px;
}
.journey-lead .jl-bubble {
  bottom: 18px;
  border-radius: 20px 20px 20px 7px;
}
.journey-lead .jl-bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--surface-raised, #fff);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}
