/* andAndrea, Andrea's hello to a new buyer (Brad, 2026-10-08): its card at
   the top of Your Guides, and the page the email links to (/hello). */

/* ---------- The player ---------- */
.hello-player {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.7rem;
  padding: 0.45rem 0.85rem 0.45rem 0.45rem;
  border-radius: 999px;
  background: var(--paper);
}
.hello-play {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--magenta);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hello-play svg { width: 20px; height: 20px; }
.hello-track { position: relative; flex: 1; min-width: 0; height: 30px; cursor: pointer; }
.hello-bars { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; }
.hello-bars i { flex: 1; min-width: 1px; border-radius: 2px; background: rgba(218, 24, 132, 0.25); }
.hello-bars.is-lit i { background: var(--magenta); }
.hello-time { flex: none; font-size: 0.82rem; font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---------- On Your Guides ---------- */
#andrea-hello:empty { display: none; }
.hello-card {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0.9rem 0.95rem;
  border-radius: 18px;
  background: var(--blush);
  border: 1px solid rgba(218, 24, 132, 0.25);
  text-align: left;
}
.hello-card-pic { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
/* Waiting to be played: Andrea's face breathes (2026-10-29). */
.hello-card.is-waiting .hello-card-pic { animation: hello-breathe 2.6s ease-out infinite; }
@keyframes hello-breathe {
  0% { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--magenta), 0 0 0 4px rgba(218, 24, 132, 0.45); }
  100% { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--magenta), 0 0 0 14px rgba(218, 24, 132, 0); }
}
.hello-card-body { flex: 1; min-width: 0; }
.hello-card-title { margin: 0; font-weight: 700; font-size: 1.02rem; line-height: 1.3; color: var(--ink); }
.hello-card-sub { margin: 0.15rem 0 0; font-size: 0.88rem; line-height: 1.4; color: var(--muted); }

/* ---------- The email's page ---------- */
.hello-listen-main { max-width: 440px; margin: 0 auto; padding: 2.5rem 16px 3rem; text-align: center; }
.hello-listen-pic { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 1rem; }
.hello-listen-title { margin: 0; font-size: 1.6rem; line-height: 1.2; }
.hello-listen-sub { margin: 0.4rem 0 0; font-size: 1rem; line-height: 1.45; color: var(--muted); }
#hello-listen .hello-player { margin: 1.4rem 0 0; background: var(--blush); text-align: left; }
.hello-listen-after { margin: 1.2rem 0 0; font-size: 0.92rem; color: var(--muted); }
.hello-listen-go { margin-top: 1.2rem; }

/* ---------- The pop-up (2026-10-29, mockups/hello-popup.html) ----------
   The first time she opens the app with her hello unplayed (hello-card.js). */
html.hp-open, html.hp-open body { overflow: hidden; }
.hp-veil {
  position: fixed;
  inset: 0;
  z-index: 4000; /* over the app bar and strips, under the update screen */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  background: rgba(26, 26, 26, 0.32);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  animation: hp-in 0.25s ease both;
}
@keyframes hp-in { from { opacity: 0; } to { opacity: 1; } }
.hp-pop {
  width: 100%;
  max-width: 360px;
  max-height: 100%;
  overflow-y: auto;
  padding: 30px 20px 16px;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 55%, var(--blush) 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  text-align: center;
  outline: none;
}
.hp-face { position: relative; width: 116px; height: 116px; margin: 0 auto 14px; }
.hp-face img { position: relative; z-index: 1; display: block; width: 116px; height: 116px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--magenta); }
/* Waiting: two soft rings breathe out from her face. */
.hp-face::before, .hp-face::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--magenta); opacity: 0; animation: hp-ripple 2.6s ease-out infinite; }
.hp-face::after { animation-delay: 1.3s; }
@keyframes hp-ripple { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.45); opacity: 0; } }
/* Playing: her photo glows with her voice instead; played: it rests. */
.hp-pop:has(.hello-player.playing) .hp-face::before, .hp-pop:has(.hello-player.playing) .hp-face::after,
.hp-face.is-done::before, .hp-face.is-done::after { animation: none; opacity: 0; }
.hp-pop:has(.hello-player.playing) .hp-face img { animation: hp-voice 0.42s ease-in-out infinite alternate; }
@keyframes hp-voice {
  from { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--magenta), 0 0 0 6px rgba(218, 24, 132, 0.25); }
  to { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--magenta), 0 0 0 15px rgba(218, 24, 132, 0.18); }
}
.hp-kick { margin: 0; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--magenta); }
.hp-title { margin: 6px 0; font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; line-height: 1.15; color: var(--ink); text-wrap: balance; }
.hp-sub { margin: 0; font-size: 0.98rem; line-height: 1.45; color: var(--muted); }
.hp-pop .hello-player { margin: 18px 0 0; padding: 0.5rem 0.9rem 0.5rem 0.5rem; background: var(--blush); text-align: left; }
.hp-pop .hello-play { width: 56px; height: 56px; box-shadow: 0 6px 16px rgba(218, 24, 132, 0.35); }
.hp-pop .hello-play svg { width: 24px; height: 24px; }
.hp-pop .hello-track { height: 34px; }
.hp-later { display: block; margin: 12px auto 0; padding: 0.45rem 1rem; border: 0; background: none; font: inherit; font-size: 0.95rem; font-weight: 600; color: var(--muted); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hp-close { display: block; width: 100%; margin: 14px 0 4px; padding: 0.8rem; border: 0; border-radius: 999px; background: var(--magenta); color: #fff; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hp-later[hidden], .hp-close[hidden] { display: none; }
.hp-later:focus-visible, .hp-close:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .hello-card.is-waiting .hello-card-pic, .hp-veil, .hp-face::before, .hp-face::after, .hp-pop:has(.hello-player.playing) .hp-face img { animation: none; }
  .hello-card.is-waiting .hello-card-pic { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--magenta); }
}
