/* Harborview Commons — "Meet Your Leasing Director" greeting card
   (public/book-tour.html only). Sits between the page intro and the
   3-step booking wizard. Reuses the shared design tokens defined in
   styles.css (colors, radii, shadows, spacing) — no parallel system.

   No recorded video of the agent exists for this demo, so this is an
   honest, clearly-animated stand-in: a gradient avatar orb with a
   pulsing "on air" ring and a small waveform, plus a greeting message
   that types itself out once the card scrolls into view. See
   CONTENT_NOTES.md for the real-vs-simulated breakdown. */

.ag-wrap {
  background: var(--hv-cream);
  padding: 0 0 var(--space-md);
}

.ag-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--hv-white);
  border: 1px solid var(--hv-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--space-md) var(--space-lg);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.ag-card:hover { box-shadow: var(--shadow-lift); }

/* ---------- Avatar orb ---------- */
.ag-avatar {
  position: relative;
  flex: none;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ag-avatar-orb {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--hv-teal-light), var(--hv-deep) 70%);
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.18), inset 0 3px 6px rgba(255, 255, 255, 0.18);
}
.ag-avatar-initials {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--hv-white);
  letter-spacing: 0.02em;
}
/* "On air" ring — a soft pulse that stands in for a speaking indicator,
   since there's no live/recorded feed to actually animate. Disabled via
   the .is-static class (added in JS when prefers-reduced-motion matches),
   mirroring this codebase's JS-gated reduced-motion convention. */
.ag-avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--hv-brass);
  opacity: 0;
  animation: ag-ring-pulse 2.6s ease-out infinite;
}
.ag-avatar-ring--delay { animation-delay: 1.3s; }
@keyframes ag-ring-pulse {
  0% { transform: scale(0.82); opacity: 0.55; }
  75% { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(1.22); opacity: 0; }
}
.ag-card.is-static .ag-avatar-ring { animation: none; opacity: 0.35; transform: none; }

/* ---------- Copy ---------- */
.ag-copy { min-width: 0; flex: 1; }
.ag-copy .eyebrow { margin-bottom: 0.3rem; }
.ag-name-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
}
.ag-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--hv-deep);
}
.ag-role {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hv-teal);
}
.ag-greeting {
  margin: 0 0 0.4rem;
  min-height: 2.6em;
  color: var(--hv-ink);
  font-size: 0.98rem;
}
.ag-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--hv-brass-dark);
  animation: ag-caret-blink 0.9s step-end infinite;
}
.ag-caret[hidden] { display: none; }
@keyframes ag-caret-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.ag-contact {
  margin: 0;
  font-size: 0.85rem;
  color: var(--hv-teal);
  overflow-wrap: break-word;
}
.ag-contact a { color: var(--hv-teal); text-decoration: underline; text-underline-offset: 2px; }
.ag-contact a:hover { color: var(--hv-brass-dark); }
.ag-contact-sep { margin: 0 0.45rem; opacity: 0.6; }

/* ---------- Waveform ---------- */
.ag-waveform {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 30px;
  padding-bottom: 2px;
}
.ag-wave-bar {
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--hv-brass), var(--hv-teal));
  height: 30%;
  animation: ag-wave-bounce 1.1s ease-in-out infinite;
}
.ag-wave-bar:nth-child(1) { animation-delay: 0s; }
.ag-wave-bar:nth-child(2) { animation-delay: 0.12s; }
.ag-wave-bar:nth-child(3) { animation-delay: 0.24s; }
.ag-wave-bar:nth-child(4) { animation-delay: 0.36s; }
.ag-wave-bar:nth-child(5) { animation-delay: 0.48s; }
@keyframes ag-wave-bounce {
  0%, 100% { height: 22%; }
  50% { height: 100%; }
}
.ag-card.is-static .ag-wave-bar { animation: none; height: 45%; }
.ag-card.is-static .ag-wave-bar:nth-child(2),
.ag-card.is-static .ag-wave-bar:nth-child(4) { height: 65%; }
.ag-card.is-static .ag-wave-bar:nth-child(3) { height: 85%; }

/* ---------- Honesty disclosure ---------- */
.ag-disclosure {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--hv-teal);
  margin: var(--space-xs) 0 0;
  text-align: center;
}
.ag-disclosure svg { width: 14px; height: 14px; flex: none; }

/* Visually-hidden helper — used so screen readers get the full greeting
   read once, cleanly, instead of the animated letter-by-letter reveal
   (which is aria-hidden). */
.ag-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .ag-card { flex-wrap: wrap; padding: var(--space-md); }
  .ag-waveform { order: 3; margin-left: calc(84px + var(--space-md)); }
}
@media (max-width: 480px) {
  .ag-waveform { display: none; }
}
