/* ── TALK — /talk: say hi to Sara by text or on the phone ───────────────────────
   A frost page (site.css "FROST PAGES"): one centred column, every pane the same
   width, so the line, the chip, the stage and the pick share one axis. */

.talk {
  --talk-w: 640px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 150px 24px 120px;
}
.talk h1 {
  font-family: 'Instrument Serif', serif; font-weight: 400;
  font-size: clamp(52px, 7vw, 88px); line-height: 1.02; letter-spacing: -3px;
  color: var(--text-primary); text-wrap: balance;
}
.talk-sub {
  font-size: 17px; line-height: 1.65; color: var(--text-secondary);
  max-width: 500px; margin: 20px auto 36px; text-wrap: balance;
}
.talk-sub b { font-weight: 600; color: var(--text-primary); }

/* The three ways: one chip, on the site's .seg */
.talk-mode { margin: 0; z-index: 3; }
.talk-stage { width: 100%; max-width: var(--talk-w); }
.talk-view { display: flex; flex-direction: column; align-items: center; }

/* Every pane of glass on this page */
.talk-pane { width: 100%; max-width: var(--talk-w); border-radius: 32px; }
.talk-head {
  display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--text-muted);
}
.talk-head span { margin-left: 8px; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.talk-note { font-size: 13.5px; line-height: 1.55; color: var(--text-muted); }
.talk-status { font-size: 14.5px; line-height: 1.55; color: var(--text-secondary); max-width: 460px; }
.talk-status.warn { color: #9A5B13; font-weight: 500; }
.talk-status.ok { color: var(--text-primary); font-weight: 500; }

/* ── The conversation: her lines lit glass, yours navy ── */
.talk-lines {
  display: flex; flex-direction: column; gap: 8px; text-align: left;
  overflow-y: auto; overscroll-behavior: contain; padding: 4px 4px 6px;
}
.talk-line { display: flex; }
.talk-line.her { justify-content: flex-start; }
.talk-line.you { justify-content: flex-end; }
.talk-line.note { justify-content: center; }
.talk-line span {
  max-width: 80%; padding: 10px 15px; border-radius: 20px;
  font-size: 15.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}
.talk-line.her span {
  color: var(--text-primary);
  background: linear-gradient(165deg, #F2F9FD 0%, #DCEEF9 100%);
  border: 1px solid #fff; border-bottom-left-radius: 6px; box-shadow: 0 2px 8px rgba(40,130,181,0.10);
}
.talk-line.you span {
  color: var(--white); background: var(--text-primary);
  border-bottom-right-radius: 6px; box-shadow: 0 6px 16px rgba(21,34,48,0.14);
}
.talk-line.note span { padding: 2px 10px; font-size: 13px; color: var(--text-muted); text-align: center; }
.talk-line.typing span { display: inline-flex; gap: 5px; padding: 15px 16px; }
.talk-line.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: 0.35; animation: talk-dot 1.2s ease-in-out infinite; }
.talk-line.typing i:nth-child(2) { animation-delay: 0.15s; }
.talk-line.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes talk-dot { 0%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 0.9; transform: translateY(-3px); } }

/* ── TEXT — a phone conversation on glass ── */
.talk-chat { margin-top: 32px; padding: 10px 10px 10px; text-align: left; }
.talk-chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px 14px; border-bottom: 1px solid rgba(185,206,222,0.45);
}
.talk-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; position: relative; overflow: hidden;
  background: linear-gradient(165deg, rgba(255,255,255,0.96) 0%, rgba(236,245,251,0.78) 55%, rgba(214,234,247,0.72) 100%);
  border: 1px solid #fff;
  box-shadow: inset 0 -6px 12px rgba(59,159,212,0.16), 0 6px 14px rgba(40,130,181,0.16);
}
.talk-avatar::before {
  content: ""; position: absolute; inset: 18%; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,159,212,0.45) 0%, rgba(59,159,212,0) 70%);
  filter: blur(3px);
}
.talk-chat-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.talk-chat-who b { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.talk-chat-who span { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talk-online {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
}
.talk-online .dot { width: 7px; height: 7px; border-radius: 50%; background: #30C48D; box-shadow: 0 0 8px rgba(48,196,141,0.45); }
/* Tall enough to read back, short enough that the box you type in stays on screen */
.talk-chat .talk-lines { height: clamp(240px, calc(100vh - 600px), 400px); padding: 18px 10px 10px; }
.talk-compose { position: relative; margin: 6px 4px 4px; }
.talk-compose input {
  width: 100%; height: 54px; padding: 0 64px 0 22px; border-radius: 100px;
  border: 1px solid rgba(185,206,222,0.6); background: rgba(255,255,255,0.92);
  font: inherit; font-size: 15.5px; color: var(--text-primary); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.talk-compose input::placeholder { color: var(--text-muted); }
.talk-compose input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.talk-send {
  position: absolute; top: 7px; right: 7px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: var(--text-primary); box-shadow: 0 6px 14px rgba(21,34,48,0.18);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), opacity 0.2s;
}
.talk-send:hover { transform: scale(1.06); }
.talk-send:disabled { opacity: 0.35; cursor: default; transform: none; }
.talk-send svg { width: 18px; height: 18px; fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── CALL IT · HAVE IT CALL YOU — the /hear cards, in frost glass ── */
.talk-card { margin-top: 40px; padding: 38px 40px 32px; }
.talk-card > .talk-head, .talk-card form > .talk-head { margin-bottom: 14px; }
.talk-tel {
  display: inline-block; font-family: 'Instrument Serif', serif; font-weight: 400;
  font-size: clamp(46px, 7vw, 64px); line-height: 1.05; letter-spacing: -2px;
  color: var(--text-primary); text-decoration: none; transition: color 0.25s;
}
.talk-tel:hover { color: var(--accent-deep); }
.talk-tel + .talk-note { margin-top: 10px; }
.talk-card-foot { margin-top: 30px; padding-top: 26px; border-top: 1px solid rgba(185,206,222,0.45); }
.talk-card-foot > .talk-note { max-width: 400px; margin: -4px auto 18px; }
.talk-field { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.talk-field input {
  flex: 1; min-width: 0; height: 52px; padding: 0 22px; border-radius: 100px;
  border: 1px solid rgba(185,206,222,0.6); background: rgba(255,255,255,0.92);
  font: inherit; font-size: 15.5px; color: var(--text-primary); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.talk-field input::placeholder { color: var(--text-muted); }
.talk-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.talk-field input[aria-invalid="true"] { border-color: #C0473A; }
.talk-card .frost-btn { border: 0; cursor: pointer; font-family: inherit; flex-shrink: 0; }
.talk-card .frost-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.talk-card form > .talk-status, .talk-card-foot > .talk-status { margin: 16px auto 0; }

#t-ring-form { display: flex; flex-direction: column; align-items: center; }
#t-ring-form .tel-input { margin: 0 0 12px; }
#t-ring-form .talk-note { margin-bottom: 26px; }
#t-ring-go { display: inline-flex; min-width: 220px; padding: 0 30px; }
#t-ring-go .spinner { display: none; }
#t-ring-go.loading .spinner { display: inline-block; }
#t-ring-go.loading .go-arrow { display: none; }
.talk-consent { width: 100%; font-size: 12px; line-height: 1.6; color: var(--text-muted); }
.talk-card-foot.talk-consent { padding-left: max(0px, calc((100% - 440px) / 2)); padding-right: max(0px, calc((100% - 440px) / 2)); }
#t-ringing { padding: 6px 0 2px; }

/* ── HOW IT SOUNDS — the pick ── */
.talk-setup { margin-top: 28px; padding: 30px 32px 32px; text-align: left; }
.talk-setup .talk-head { margin-bottom: 12px; }
.talk-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.talk-chip {
  height: 46px; padding: 0 12px; border-radius: 100px; cursor: pointer;
  font-family: inherit; font-size: 14.5px; font-weight: 600; color: var(--text-primary);
  background: rgba(255,255,255,0.78); border: 1px solid rgba(255,255,255,0.95);
  box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(40,130,181,0.08);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.talk-chip:hover { background: var(--white); }
.talk-chip[aria-checked="true"] { background: var(--text-primary); color: var(--white); border-color: var(--text-primary); box-shadow: 0 8px 20px rgba(21,34,48,0.16); }
.talk-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.talk-fine { margin-top: 22px; font-size: 12.5px; color: var(--text-muted); }

/* ── Phone ── */
@media (max-width: 600px) {
  .talk { padding: 120px 16px 90px; }
  .talk h1 { letter-spacing: -2px; }
  .talk-sub { font-size: 16px; margin-bottom: 30px; }
  /* Three ways in one row, each as wide as its words */
  .talk-mode { display: flex; width: 100%; max-width: 380px; gap: 2px; }
  .talk-mode button { flex: auto; padding: 10px 8px; letter-spacing: 1.2px; white-space: nowrap; }
  .talk-pane { border-radius: 26px; }
  .talk-chat { margin-top: 28px; padding: 6px; }
  .talk-chat .talk-lines { height: clamp(260px, calc(100svh - 420px), 360px); }
  .talk-card { margin-top: 28px; padding: 30px 20px 26px; }
  .talk-field { flex-direction: column; }
  .talk-field input { flex: none; width: 100%; }
  .talk-field .frost-btn { width: 100%; }
  .talk-setup { padding: 24px 18px 24px; }
}
/* The smallest phones: the chip's words a little tighter so all three stay on one line */
@media (max-width: 360px) {
  .talk-mode button { padding: 10px 6px; letter-spacing: 0.8px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .talk-line.typing i { animation: none; opacity: 0.6; }
}
