/* =====================================================================
   MESSENGER / WHATSAPP-STYLE DESIGN — layered on top of style.css
   ===================================================================== */

.msg-design { background: var(--white); }

/* ---------- CHAT HERO ---------- */
.chat-hero{
  position: relative;
  min-height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 130px 24px 70px;
  overflow: hidden;
}
.chat-hero-inner{
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 900px;
}
.hero-photo-wrap{
  position: relative;
  flex: none;
  width: 388px; z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-photo-img{
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
}
.hero-photo-blob{
  position: absolute;
  z-index: 0;
  width: 122%;
  aspect-ratio: 1 / 1;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  background: linear-gradient(160deg, var(--orange-soft), #ffffff 70%);
  border-radius: 50% 50% 48% 52% / 52% 48% 52% 48%;
}
.hero-bubble{ max-width: 460px; position: relative; z-index: 3; margin-left: -78px; }
.hero-bubble .msg-bubble{ font-size: 18px; }

/* floating background bubbles */
.float-bubbles{ position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.fb{
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, var(--orange-soft), rgba(255,241,234,0) 70%);
  will-change: transform;
}
.fb-1{ width: 360px; height: 360px; top: 6%;  left: 4%; }
.fb-2{ width: 230px; height: 230px; bottom: 8%; right: 8%; }
.fb-3{ width: 150px; height: 150px; top: 16%; right: 20%; }
.fb-4{ width: 100px; height: 100px; bottom: 24%; left: 18%; }

.chat-scroll-cue{
  position: relative;
  z-index: 2;
  margin-top: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-text);
}

/* ---------- MESSAGES (WhatsApp bubbles) ---------- */
.msg{
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 640px;
  margin: 0 0 15px;
}
.msg-av{
  width: 40px; height: 40px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
}
.msg-av.client{
  display: flex; align-items: center; justify-content: center;
  background: #12b76a;               /* incoming = whatsapp-ish green avatar */
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
}
.msg-body{ display: flex; flex-direction: column; min-width: 0; }
.msg-name{
  font-size: 13px; font-weight: 700;
  color: var(--gray-text);
  margin: 0 0 4px 6px;
}
.msg-bubble{
  position: relative;
  padding: 11px 15px 10px;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--black);
  box-shadow: 0 1px 1.5px rgba(10,10,10,.08);
  word-wrap: break-word;
}
.msg-bubble p{ margin: 0; padding-right: 58px; }
.msg-bubble strong{ font-weight: 700; }
.msg-time{
  position: absolute;
  right: 11px; bottom: 8px;
  font-size: 10.5px;
  color: #8a9099;
  display: inline-flex; align-items: center; gap: 3px;
  white-space: nowrap;
}
.msg-time .ticks{ width: 15px; height: 10px; color: #34b7f1; }

/* incoming (client, left, white) */
.msg-in .msg-bubble{
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 4px 15px 15px 15px;
}
/* outgoing (Oliver, right, soft orange) */
.msg-out{ flex-direction: row-reverse; }
.msg-out .msg-body{ align-items: flex-end; }
.msg-out .msg-name{ margin: 0 6px 4px 0; }
.msg-out .msg-bubble{
  background: #ffe9df;
  border: 1px solid #ffd9c7;
  border-radius: 15px 4px 15px 15px;
}

/* ---------- CHAT THREAD + CENTER "STRING" LINE ---------- */
.chat-thread{
  position: relative;
  max-width: 940px;
  margin: 0 auto;
  padding: 44px 24px;
}
/* the glowing orange string down the middle */
.chat-thread::before{
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px;
  background: linear-gradient(180deg, rgba(255,90,31,.18), rgba(255,90,31,.5) 50%, rgba(255,90,31,.18));
  z-index: 0;
}
/* travelling light on the string */
.chat-thread::after{
  content: "";
  position: absolute;
  left: 50%; margin-left: -4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 14px 4px rgba(255,90,31,.55);
  animation: stringGlow 4.5s linear infinite;
  z-index: 0;
}
@keyframes stringGlow{
  0%   { top: -12px;  opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { top: 100%;   opacity: 0; }
}
.chat-thread .msg{
  position: relative;
  z-index: 1;
  width: calc(50% - 26px);
}
.chat-thread .msg-out{ margin-left: auto; }   /* right of the line */
.chat-thread .msg-in { margin-right: auto; }  /* left of the line */
/* client replies sit slightly lower than the reply they answer */
.chat-thread .msg-in{ margin-top: 20px; }

/* message reveal + "is typing…" (driven by chat.js) */
[data-msg]{ opacity: 0; }
.msg-in[data-msg]{  transform: translate(-22px, 10px); }
.msg-out[data-msg]{ transform: translate( 22px, 10px); }
[data-msg].is-typing, [data-msg].revealed{
  opacity: 1; transform: translate(0, 0);
  transition: opacity .4s ease, transform .4s ease;
}
[data-msg] .msg-bubble{ visibility: hidden; }          /* reserves height -> stable layout */
[data-msg].revealed .msg-bubble{ visibility: visible; animation: bubblePop .34s cubic-bezier(.2,.8,.25,1); }
@keyframes bubblePop{ from{ opacity: 0; transform: scale(.92) translateY(5px); } to{ opacity: 1; transform: none; } }
.is-typing .msg-name{ font-style: italic; }

/* typing dots bubble */
.msg-body{ position: relative; }
.typing{ position: absolute; top: 26px; z-index: 2; display: none; align-items: center; gap: 5px; padding: 14px 16px;
  background: #fff; border: 1px solid #ececec; border-radius: 4px 15px 15px 15px;
  box-shadow: 0 1px 1.5px rgba(10,10,10,.08); }
.msg-in .typing{ left: 0; }
.msg-out .typing{ right: 0; background: #ffe9df; border-color: #ffd9c7; border-radius: 15px 4px 15px 15px; }
[data-msg].is-typing .typing{ display: inline-flex; }
.typing span{ width: 7px; height: 7px; border-radius: 50%; background: #a7adb4; animation: typingBlink 1.2s infinite; }
.typing span:nth-child(2){ animation-delay: .18s; }
.typing span:nth-child(3){ animation-delay: .36s; }
@keyframes typingBlink{ 0%,60%,100%{ opacity: .35; transform: translateY(0); } 30%{ opacity: 1; transform: translateY(-4px); } }

/* "perfect" reaction sticker (person holding a sign) */
.perfect-sticker{ width: 210px; height: 150px; display: flex; align-items: center; justify-content: center;
  border-radius: 11px; overflow: hidden; background: linear-gradient(160deg, #fff6ef, #ffe7d6); }
.perfect-sticker svg{ width: 156px; height: auto; transform-origin: center bottom;
  animation: psBob 2.4s ease-in-out infinite; }
@keyframes psBob{ 0%,100%{ transform: translateY(0) rotate(-1.5deg); } 50%{ transform: translateY(-7px) rotate(1.5deg); } }

/* ---------- INTERRUPT SECTIONS (cover the string, centred) ---------- */
.chat-interrupt{
  position: relative;
  z-index: 2;
  background: var(--white);
}
.chat-interrupt .stats{ margin-top: 10px; }
.chat-interrupt-work{ background: var(--white); }

/* value tiles only */
.choose-tilesonly{ padding: 70px 0; }
.choose-tilesonly .section-header{ margin-bottom: 40px; }

/* ---------- MONEY-RAIN "GIF" ---------- */
.msg-bubble-media{ padding: 5px; }
.money-rain{
  position: relative;
  width: 210px; height: 140px;
  overflow: hidden;
  border-radius: 11px;
  background: linear-gradient(160deg, #fff6f0, #ffe4d3);
}
.money-rain span{
  position: absolute;
  top: -34px;
  font-size: 24px;
  animation: moneyFall linear infinite;
}
@keyframes moneyFall{
  0%   { transform: translateY(-34px) rotate(0deg);   opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translateY(172px) rotate(40deg);  opacity: .95; }
}
.money-rain span:nth-child(1){ left: 4%;  animation-duration: 2.3s; animation-delay: 0s;   }
.money-rain span:nth-child(2){ left: 15%; animation-duration: 2.9s; animation-delay: .8s;  }
.money-rain span:nth-child(3){ left: 27%; animation-duration: 2.1s; animation-delay: .3s;  }
.money-rain span:nth-child(4){ left: 39%; animation-duration: 3.1s; animation-delay: 1.1s; }
.money-rain span:nth-child(5){ left: 50%; animation-duration: 2.5s; animation-delay: .5s;  }
.money-rain span:nth-child(6){ left: 61%; animation-duration: 2.8s; animation-delay: 1.4s; }
.money-rain span:nth-child(7){ left: 72%; animation-duration: 2.2s; animation-delay: .2s;  }
.money-rain span:nth-child(8){ left: 83%; animation-duration: 3.0s; animation-delay: .9s;  }
.money-rain span:nth-child(9){ left: 91%; animation-duration: 2.4s; animation-delay: 1.6s; }
.money-rain span:nth-child(10){left: 48%; animation-duration: 2.7s; animation-delay: 2.0s; }
.msg-time-onmedia{
  right: 10px; bottom: 8px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
  background: rgba(0,0,0,.18);
  padding: 1px 6px; border-radius: 8px;
}

/* ---------- CONTACT: WhatsApp attach-a-contact widget ---------- */
.wa-contact-section{
  background: var(--white);
  color: var(--black);
  border-radius: 0;
  margin-top: 0;
  padding: 20px 0 70px;
}
.wa-contact-section .eyebrow{ color: var(--orange); }
.wa-contact-section .contact-heading{ color: var(--black); }
.wa-contact-section .copyright{ color: var(--gray-text); }

.wa-widget{ max-width: 440px; margin: 0 auto 34px; text-align: left; }
.wa-inputbar{
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 28px;
  padding: 7px 7px 7px 14px;
  box-shadow: 0 8px 24px rgba(10,10,10,.12);
}
.wa-clip{
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: #54656f;
  transform: rotate(0deg);
  transition: transform .3s ease, color .3s ease;
}
.wa-clip svg{ width: 24px; height: 24px; }
.wa-clip.pulse{ animation: clipPulse 1.6s ease-in-out infinite; }
@keyframes clipPulse{ 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.18); color: var(--orange); } }
.wa-clip.open{ transform: rotate(45deg); color: var(--orange); }
.wa-field{ flex: 1; color: #98a0a8; font-size: 15px; }
.wa-send{
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--orange); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.wa-send svg{ width: 20px; height: 20px; margin-left: 2px; }
.wa-hint{
  margin: 12px 4px 0;
  font-size: 13px; color: var(--gray-text);
  transition: opacity .3s ease;
}

.wa-panel{
  margin-top: 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(10,10,10,.16);
  overflow: hidden;
  transform-origin: bottom center;
  animation: waPop .32s cubic-bezier(.2,.8,.25,1);
}
.wa-panel[hidden]{ display: none; }   /* beats .wa-attach{display:grid} */
@keyframes waPop{ from{ opacity: 0; transform: translateY(10px) scale(.97); } to{ opacity: 1; transform: none; } }

.wa-attach{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 22px; }
.wa-att{
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--gray-text);
}
.wa-att-ic{
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px;
}
/* blue Contact button, big strong orange pulse */
.wa-att-contact .wa-att-ic{ box-shadow: 0 0 0 0 rgba(255,90,31,.7);
  animation: ctPing 1.25s ease-out infinite, ctBounce 1.25s ease-in-out infinite; }
@keyframes ctPing{ 0%{ box-shadow: 0 0 0 0 rgba(255,90,31,.7);} 70%{ box-shadow: 0 0 0 30px rgba(255,90,31,0);} 100%{ box-shadow: 0 0 0 30px rgba(255,90,31,0);} }
@keyframes ctBounce{ 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.18);} }

.wa-contacts-head{
  padding: 14px 18px; font-weight: 700;
  background: var(--orange); color: #fff;
}
.wa-ct{
  display: flex; align-items: center; gap: 13px;
  width: 100%; padding: 12px 16px;
  background: none; border: none; border-bottom: 1px solid #f2f2f2;
  text-align: left; cursor: pointer;
  transition: background .2s ease;
}
.wa-ct:last-child{ border-bottom: none; }
.wa-ct:not(:disabled):hover{ background: #fff7f3; }
.wa-ct:disabled{ opacity: .5; cursor: default; }
.wa-ct-av{ width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.wa-ct-av.fake{ display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 15px; }
.wa-ct-name{ display: flex; flex-direction: column; font-weight: 600; color: var(--black); }
.wa-ct-name small{ font-weight: 500; color: var(--gray-text); font-size: 12px; margin-top: 1px; }
.wa-ct-me{ background: #fff7f3; }

.wa-card{ padding: 24px; text-align: center; }
.wa-card-top{ display: flex; align-items: center; gap: 14px; justify-content: center; margin-bottom: 22px; }
.wa-card-av{ width: 56px; height: 56px; border-radius: 50%; }
.wa-card-top > div{ text-align: left; }
.wa-card-name{ font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.wa-card-sub{ font-size: 12.5px; color: var(--gray-text); }
.wa-card .contact-buttons{ margin-bottom: 0; }
.wa-card .contact-btn{ border: 1.5px solid var(--gray-line); padding: 16px 30px; font-size: 16px; }
.wa-card .contact-btn svg{ width: 20px; height: 20px; }

/* ---------- RESPONSIVE: mobile = 1:1 WhatsApp column ---------- */
@media (max-width: 820px){
  .chat-hero{ min-height: auto; padding: 120px 18px 50px; }
  .chat-hero-inner{ flex-direction: column; gap: 22px; }
  .hero-photo-wrap{ width: 200px; }
  .hero-bubble{ max-width: 90%; margin-left: 0; }

  .chat-thread{ padding: 26px 16px; }
  .chat-thread::before, .chat-thread::after{ display: none; }  /* no centre line on mobile */
  .chat-thread .msg{ width: 100%; margin: 0 0 12px; }
  .chat-thread .msg-in{ margin-top: 0; }
  /* 1:1 WhatsApp layout: drop per-message avatars, my texts right, others left */
  .msg{ max-width: 100%; gap: 0; }
  .msg-av{ display: none; }
  .msg-out{ flex-direction: row; justify-content: flex-end; }
  .msg-in{ justify-content: flex-start; }
  .msg-body{ max-width: 86%; }

  .fb-1{ width: 220px; height: 220px; }
  .fb-2{ width: 150px; height: 150px; }
}
