/* ============================================================
   Homepage "Ask Brent" — AI-style, prompt-first answer finder.
   Select-never-generate: matches a typed question to the closed,
   Brent-reviewed card set; never invents an answer.
   On the site design system: real tokens, white section (alternates
   between its two ivory neighbors), no chat bubbles.
   ============================================================ */

.ask {
  --ask-navy:  var(--color-navy);
  --ask-ink:   var(--color-charcoal);
  --ask-muted: color-mix(in srgb, var(--color-charcoal) 58%, #ffffff);
  --ask-tint:  var(--color-ivory);
  --ask-line:  var(--color-stone);

  background: var(--color-white);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.ask__inner { max-width: 720px; margin: 0 auto; }

/* Header */
.ask__header { text-align: center; margin: 0 auto clamp(1.5rem, 4vw, 2rem); }
.ask__eyebrow {
  color: var(--ask-navy);
  letter-spacing: 0.14em; text-transform: uppercase;
  font-size: 0.8rem; font-weight: 600; margin: 0 0 0.75rem;
}
.ask__headline {
  font-family: var(--font-serif, "Spectral", Georgia, serif);
  font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 600;
  color: var(--ask-navy); line-height: 1.12; margin: 0 0 0.8rem;
}
.ask__lede {
  color: var(--ask-muted); font-size: 1.08rem; line-height: 1.7;
  margin: 0 auto; max-width: 600px;
}

/* The prompt box — the focal point */
.ask__box {
  display: flex; align-items: flex-end; gap: 0.5rem;
  max-width: 680px; margin: clamp(1.25rem, 3vw, 1.75rem) auto 0;
  background: var(--color-white);
  border: 1px solid var(--ask-line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 26, 46, 0.04), 0 18px 44px -28px rgba(15, 26, 46, 0.28);
  padding: 0.55rem 0.55rem 0.55rem 1.15rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.ask__box:focus-within {
  border-color: var(--ask-navy);
  box-shadow: 0 1px 2px rgba(15, 26, 46, 0.05), 0 18px 44px -26px rgba(15, 26, 46, 0.34),
              0 0 0 3px color-mix(in srgb, var(--ask-navy) 12%, transparent);
}
.ask__input {
  flex: 1; border: none; outline: none; resize: none;
  font: inherit; font-size: 1.08rem; line-height: 1.5;
  color: var(--ask-ink); background: transparent;
  padding: 0.55rem 0; max-height: 160px; overflow-y: auto;
}
.ask__input::placeholder { color: var(--ask-muted); }
.ask__send {
  flex: 0 0 auto; width: 44px; height: 44px;
  border: none; border-radius: 12px;
  background: var(--ask-navy); color: #fff; font-size: 1.2rem;
  cursor: pointer; display: grid; place-items: center;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.ask__send:hover { opacity: 0.9; }
.ask__send:active { transform: translateY(1px); }
.ask__send:disabled { opacity: 0.4; cursor: not-allowed; }
.ask__send:disabled:active { transform: none; }

/* Character counter under the box */
.ask__count { text-align: right; font-size: 0.8rem; color: var(--ask-muted); margin: 0.4rem 0.3rem 0; min-height: 1.1em; }
.ask__count--over { color: #c0392b; font-weight: 600; }

/* Prompt chips — starters first, then the newest answer's follow-ups; always under the ask bar */
.ask__prompts { margin-top: 1.1rem; text-align: center; }
.ask__prompts-label { font-size: 0.85rem; color: var(--ask-muted); margin: 0 0 0.6rem; }

/* Transcript sits ABOVE the ask bar; the bar + prompts follow the newest answer */
.ask__transcript:empty { display: none; }
.ask__transcript .ask__answer:first-child { margin-top: 0; padding-top: 0; border-top: none; }

/* Chips (starters + follow-ups) */
.ask-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.ask-chips--left { justify-content: flex-start; }
.ask-chip {
  background: var(--color-white); border: 1px solid var(--ask-line);
  color: var(--ask-navy); border-radius: 999px;
  padding: 0.5rem 0.95rem; font: inherit; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
}
.ask-chip:hover { background: var(--ask-tint); border-color: color-mix(in srgb, var(--ask-navy) 32%, var(--ask-line)); }
.ask-chip:active { transform: translateY(1px); }

/* The answer — a clean document, no bubbles */
.ask__answer {
  margin-top: 2.25rem; padding-top: 2rem;
  border-top: 1px solid var(--ask-line);
  animation: ask-rise 0.3s ease both;
  scroll-margin-top: 100px;   /* land below the sticky header when scrolled to */
}
@keyframes ask-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* Question — right-aligned and larger (the "you asked" side) */
.ask__turn-q { text-align: right; margin: 0 0 1.4rem; }
.ask__q-eyebrow { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ask-muted); margin: 0 0 0.35rem; }
.ask__q { font-family: var(--font-serif, "Spectral", Georgia, serif); font-size: clamp(1.4rem, 3.2vw, 1.8rem); font-weight: 600; color: var(--ask-navy); line-height: 1.25; margin: 0 0 0 auto; max-width: 88%; }

/* Answer — left-aligned, smaller, indented with a subtle accent (the response side) */
.ask__turn-a { text-align: left; border-left: 2px solid var(--ask-line); padding-left: clamp(0.9rem, 2.5vw, 1.4rem); }
.ask__a-eyebrow { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ask-navy); font-weight: 700; opacity: 0.7; margin: 0 0 0.5rem; }
.ask__a { font-size: 1.01rem; line-height: 1.75; color: var(--ask-ink); margin: 0; }
.ask__a p { margin: 0 0 0.75rem; } .ask__a p:last-child { margin-bottom: 0; }

.ask__example { margin-top: 1.15rem; background: var(--ask-tint); border-radius: var(--radius-card, 12px); padding: 1rem 1.15rem; }
.ask__example-label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ask-navy); font-weight: 700; opacity: 0.8; margin: 0 0 0.4rem; }
.ask__example p { margin: 0; font-size: 0.98rem; line-height: 1.7; color: var(--ask-ink); }

.ask__handoff { margin: 1.15rem 0 0; font-size: 1rem; line-height: 1.7; color: var(--ask-ink); font-style: italic; }

.ask-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.35rem; }
.ask-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border-radius: var(--radius-button, 10px); padding: 0.65rem 1.15rem;
  font-size: 0.92rem; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; line-height: 1.2;
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.1s ease;
}
.ask-btn:active { transform: translateY(1px); }
.ask-btn--primary { background: var(--ask-navy); color: #fff; }
.ask-btn--primary:hover { box-shadow: 0 8px 18px -8px rgba(15, 26, 46, 0.45); }
.ask-btn--ghost { background: transparent; color: var(--ask-navy); border-color: var(--ask-line); }
.ask-btn--ghost:hover { background: var(--ask-tint); }

.ask__followups { margin-top: 1.75rem; }
.ask__followups h4 { font-size: 0.85rem; font-weight: 600; color: var(--ask-muted); margin: 0 0 0.6rem; }

.ask__disclaimer { text-align: center; color: var(--ask-muted); font-size: 0.82rem; margin: 2rem auto 0; max-width: 600px; }
.ask__browse { text-align: center; margin-top: 0.6rem; }
.ask__browse a { color: var(--ask-navy); font-weight: 600; text-decoration: none; font-size: 0.9rem; }
.ask__browse a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .ask__answer { animation: none; }
}
