/* Centered round chat hero */

.page-home .site-header {
  background: rgba(250, 247, 242, .92);
  border-bottom: none;
}

.chat-hero {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px 48px;
  background:
    radial-gradient(ellipse 75% 55% at 50% 0%, rgba(179, 166, 219, .28), transparent 60%),
    var(--cream);
}

.chat-center {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.chat-brand {
  margin-bottom: 20px;
  transition: opacity .35s, max-height .35s, margin .35s;
}

.chat-brand img {
  height: 44px;
  width: auto;
  margin: 0 auto 12px;
}

.chat-brand .eyebrow {
  margin-bottom: .5rem;
}

.chat-brand h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
  margin-bottom: .5rem;
}

.chat-brand h1 em {
  font-style: italic;
  color: var(--purple);
}

.chat-brand .tagline {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0;
}

.chat-hero.is-active .chat-brand {
  opacity: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}

.chat-thread {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  text-align: left;
  transition: max-height .4s ease, opacity .3s ease, margin .3s ease;
}

.chat-hero.is-active .chat-thread {
  max-height: 44vh;
  overflow-y: auto;
  opacity: 1;
  margin-bottom: 20px;
  padding: 0 4px;
}

.chat-msg {
  margin-bottom: 16px;
  animation: fade-up .3s ease;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.chat-msg.user { text-align: right; }

.chat-msg.user .chat-msg-inner {
  display: inline-block;
  text-align: left;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 18px 18px 4px 18px;
  max-width: 90%;
  font-size: .92rem;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}

.chat-msg.assistant .chat-msg-inner {
  font-size: .93rem;
  line-height: 1.55;
  color: var(--ink);
  overflow-wrap: break-word;
  word-break: break-word;
}

.chat-msg.assistant a {
  color: var(--indigo);
  font-weight: 600;
}

.chat-typing {
  color: var(--muted);
  font-style: italic;
  font-size: .9rem;
}

/* Follow-up suggestions after answers (Claude-style) */
.chat-followups {
  margin: 4px 0 18px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.chat-followups.is-visible {
  opacity: 1;
  transform: none;
}

.chat-followups-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-followups-list button {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  color: var(--indigo);
  background: var(--lavender-soft);
  border: 1px solid rgba(179, 166, 219, .45);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.chat-followups-list button:hover {
  background: #fff;
  border-color: var(--purple);
  transform: translateY(-1px);
}

.chat-followups-list button:active {
  transform: translateY(0);
}

/* Round chat block — centered, clean */
.chat-round {
  width: 100%;
}

.chat-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px 8px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 32px -12px rgba(31, 39, 80, .15);
  transition: border-color .2s, box-shadow .2s;
}

.chat-bar:focus-within {
  border-color: var(--purple);
  box-shadow: 0 8px 36px -10px rgba(138, 120, 194, .25);
}

.chat-bar textarea {
  flex: 1;
  border: none;
  resize: none;
  font-family: var(--font-body);
  font-size: .96rem;
  line-height: 1.45;
  padding: 8px 0;
  max-height: 96px;
  outline: none;
  background: transparent;
  text-align: left;
}

.chat-bar textarea::placeholder { color: #9a9eb0; }

.chat-send {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s, transform .15s;
}

.chat-send:hover {
  background: var(--indigo);
  transform: scale(1.04);
}

.chat-starters {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.chat-starters button {
  width: auto;
  text-align: center;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.chat-starters button:hover {
  border-color: var(--purple);
  background: var(--lavender-soft);
}

.chat-legal {
  margin: 18px 0 0;
  font-size: .72rem;
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.45;
}

.chat-gem-line {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: .88rem;
  color: var(--purple);
}

.chat-legal a { font-weight: 600; }

.chat-scroll-hint {
  margin-top: 24px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
}
.chat-scroll-hint:hover { color: var(--indigo); }

.hero-cards {
  padding: 0 0 32px;
  margin-top: -8px;
}

.hero-cards .card { padding: 20px 22px; }
.hero-cards .card h3 {
  font-family: var(--font-body);
  font-size: .98rem;
  font-weight: 700;
  margin-bottom: .35rem;
}
.hero-cards .card p { font-size: .88rem; margin: 0; }

.hero-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--purple), var(--indigo));
  color: #fff;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .chat-hero {
    padding: 32px 16px 40px;
  }
  .chat-hero.is-active .chat-thread {
    max-height: 36vh;
    overflow-x: hidden;
    padding: 0 2px;
  }
  .chat-msg.user .chat-msg-inner { max-width: 85%; }
  .chat-gem-line { display: none; }
  .chat-starters { gap: 5px; }
  .chat-starters button {
    font-size: .75rem;
    padding: 6px 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-in { animation: none; opacity: 1; transform: none; }
  .chat-followups { opacity: 1; transform: none; transition: none; }
  .chat-followups-list button { transition: none; }
}
