/* Beside case study: research tabs, turn chat.
   Page-specific. Uses the v2 tokens only: --black, --paper, --ink,
   --display (Anton), --serif (Instrument Serif italic). */

/* ---- Research tabs: one toggle, two rails ---- */
.research__toggle { margin-bottom: 28px; }
.rail[hidden] { display: none; }

/* ---- Turn chat: grey statement, typing, blue reply ---- */
.turn-chat { max-width: 980px; margin: 12vh auto 0; display: flex; flex-direction: column; }
.turn-chat .tb { display: block; opacity: 0; transform: translateY(18px) scale(.95); transition: opacity .45s ease, transform .45s cubic-bezier(.2, .9, .3, 1.15); }
.turn-chat .tb-grey { width: 70.5%; align-self: flex-start; transform-origin: 0% 100%; }
.turn-chat .tb-blue { width: 66.1%; align-self: flex-end; margin-top: clamp(6px, 1.1vw, 12px); transform-origin: 100% 100%; }
.turn-chat .tb.in { opacity: 1; transform: none; }
.turn-chat .typing { align-self: flex-end; display: inline-flex; gap: 6px; padding: 12px 16px; margin-top: clamp(6px, 1.1vw, 12px); background: #0b84ff; border-radius: 18px; opacity: 0; transition: opacity .25s ease; }
.turn-chat .typing.in { opacity: 1; }
.turn-chat .typing span { width: 8px; height: 8px; border-radius: 50%; background: #ffffff; animation: typing-bounce 1.2s ease-in-out infinite; }
.turn-chat .typing span:nth-child(2) { animation-delay: .15s; }
.turn-chat .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }

@media (prefers-reduced-motion: reduce) {
  .turn-chat .tb { opacity: 1; transform: none; transition: none; }
  .turn-chat .typing { display: none; }
  .turn-chat .typing span { animation: none; }
}

/* ---- Hero: dark angled laptop + phone at the top ---- */
.hero-devices { position: relative; max-width: 880px; margin: 0 auto; }
.hero-devices__laptop { display: block; width: 100%; height: auto; }
.hero-devices__phone { position: absolute; right: 0; bottom: 0; width: 26%; height: auto; }
@media (max-width: 900px) {
  .hero-devices__phone { width: 32%; }
}
