/* Instagram and WhatsApp inhabit the same phone: a click carries the context. */
.hero-story {
  --story-height: clamp(510px, 60svh, 590px);
  --wa-green: #075e54;
  --wa-paper: #efeae2;
  --wa-message: #d9fdd3;
  --social-play: paused;
  height: var(--story-height);
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.hero-cinematic.is-ready .hero-story { animation: none; }
.story-phone {
  position: absolute;
  top: 0;
  left: 50%;
  height: calc(var(--story-height) - 37px);
  width: calc((var(--story-height) - 37px) * .49);
  padding: 24px 8px 8px;
  border-radius: 34px;
  background: #131218;
  box-shadow: 0 24px 55px #08071070, inset 0 0 0 1px #8a818f, inset 0 0 0 4px #37323e;
  transform: translateX(-50%);
  transition: transform 850ms cubic-bezier(.16, 1, .3, 1), opacity 450ms, visibility 450ms;
}
.phone-camera { position: absolute; top: 9px; left: calc(50% - 27px); width: 54px; height: 6px; border-radius: 8px; background: #040306; }
.phone-camera::after { content: ''; position: absolute; right: -12px; width: 6px; height: 6px; border-radius: 50%; background: #1e2b38; box-shadow: inset 0 0 0 2px #060607; }
.phone-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 19px 19px 26px 26px; background: #fff; color: #182226; }
.phone-home { position: absolute; z-index: 5; bottom: 5px; height: 3px; width: 70px; left: calc(50% - 35px); background: #17151e; border-radius: 4px; pointer-events: none; }
.social-instagram {
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr) 33px 33px;
  background: #fff;
  transform: translateX(0);
  transition: transform 850ms cubic-bezier(.16, 1, .3, 1), opacity 550ms;
}
.instagram-top { display: flex; gap: 6px; align-items: center; padding-inline: 12px; color: #242127; }
.instagram-top > span { font-size: 13px; font-weight: 500; letter-spacing: -.025em; }
.instagram-top .icon { width: 15px; height: 15px; stroke-width: 1.7; }
.instagram-top .icon:last-child { margin-left: auto; }
.instagram-post { position: relative; min-height: 0; background: #262626; overflow: hidden; }
.instagram-film, .instagram-film img, .instagram-film video { position: absolute; inset: 0; width: 100%; height: 100%; }
.instagram-film img, .instagram-film video { object-fit: contain; }
.instagram-film video { opacity: 0; transition: opacity 250ms; }
.has-video .instagram-film video { opacity: 1; }
.instagram-post::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,#08080b8c, transparent 27%, transparent 67%, #08080bd1); pointer-events: none; }
.instagram-account { position: absolute; z-index: 1; top: 11px; left: 10px; right: 10px; display: flex; align-items: center; gap: 6px; color: #fff; }
.social-avatar { width: 24px; height: 24px; border-radius: 50%; background: #f6f3ef; color: #54455f; display: grid; place-items: center; flex: none; }
.social-avatar .icon { width: 13px; height: 13px; }
.instagram-account strong { display: block; font-size: 9px; font-weight: 500; line-height: 1.2; }
.instagram-account small { display: block; font-size: 7px; margin-top: 2px; line-height: 1.2; }
.instagram-account > .icon { width: 16px; margin-left: auto; }
.instagram-caption { position: absolute; z-index: 1; bottom: 13px; left: 11px; right: 10px; color: #fff; }
.instagram-caption h2 { font-size: 17px; line-height: 1.1; letter-spacing: -.025em; }
.instagram-caption p { margin-top: 5px; font-size: 8px; line-height: 1.4; }
.instagram-cta { display: flex; align-items: center; gap: 7px; background: #2259a8; color: #fff; border: 0; border-radius: 0; padding: 0 11px; text-align: left; font-size: 9px; position: relative; transition: background 200ms; }
.instagram-cta > .icon { width: 15px; height: 15px; }
.instagram-cta > .icon:nth-of-type(2) { width: 13px; margin-left: auto; }
.instagram-cta:hover { background: #184780; }
.hero-cinematic .instagram-cta:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.instagram-tap { position: absolute; right: 23px; bottom: -6px; color: #fff; opacity: 0; transform: translate(30px, 24px); transition: transform 450ms cubic-bezier(.16, 1, .3, 1), opacity 220ms; pointer-events: none; filter: drop-shadow(0 2px 2px #15151e80); }
.instagram-tap .icon { width: 23px; height: 23px; fill: #fff; stroke: #24212a; stroke-width: 1.4; }
.hero-cinematic[data-handoff="tap"] .instagram-tap { opacity: 1; transform: none; }
.hero-cinematic[data-handoff="tap"] .instagram-cta { background: #123969; }
.instagram-actions { display: flex; align-items: flex-start; gap: 13px; padding: 7px 11px 0; color: #211f28; }
.instagram-actions .icon { width: 15px; height: 15px; stroke-width: 1.6; }
.instagram-actions .icon:last-child { margin-left: auto; }
.social-whatsapp {
  display: flex;
  flex-direction: column;
  background: var(--wa-paper);
  transform: translateX(102%);
  opacity: 0;
  visibility: hidden;
  transition: transform 850ms cubic-bezier(.16, 1, .3, 1), opacity 450ms, visibility 850ms;
}
.whatsapp-top { display: flex; align-items: center; gap: 6px; min-height: 48px; background: var(--wa-green); color: #fff; padding: 8px 7px; }
.whatsapp-top > .icon { width: 13px; height: 16px; flex: none; }
.whatsapp-top > .icon:last-child { margin-left: auto; transform: rotate(90deg); }
.whatsapp-avatar { width: 26px; height: 26px; border-radius: 50%; background: #d8eee6; color: var(--wa-green); display: grid; place-items: center; flex: none; }
.whatsapp-avatar .icon { width: 14px; height: 14px; }
.whatsapp-top strong { display: block; font-size: 11px; line-height: 1.3; font-weight: 500; }
.whatsapp-top div > span { display: block; font-size: 6.5px; margin-top: 3px; color: #e1f2ec; line-height: 1.3; }
.whatsapp-origin { display: flex; align-items: center; gap: 7px; background: #fff; margin: 10px 9px 0; padding: 7px; border-radius: 7px; }
.whatsapp-origin img { width: 25px; height: 32px; object-fit: cover; border-radius: 2px; }
.whatsapp-origin span { display: block; font-size: 7px; color: #56665f; line-height: 1.4; }
.whatsapp-origin strong { display: block; font-size: 9px; font-weight: 500; margin-top: 3px; line-height: 1.3; }
.whatsapp-origin > .icon { margin-left: auto; color: #766579; width: 14px; height: 14px; }
.whatsapp-messages { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px 9px 0; }
.wa-bubble { max-width: 88%; padding: 8px 9px 6px; border-radius: 8px; position: relative; line-height: 1.4; transform-origin: bottom left; }
.wa-bubble.is-shown { animation: chat-message-in 350ms cubic-bezier(.16, 1, .3, 1) both; animation-play-state: var(--social-play); }
.hero-cinematic[data-chat-static="true"] .wa-bubble { animation: none; }
.wa-bubble p { font-size: 10px; line-height: 1.45; }
.wa-outgoing { background: var(--wa-message); align-self: flex-end; border-top-right-radius: 2px; transform-origin: bottom right; padding-right: 18px; }
.wa-incoming { background: #fff; align-self: flex-start; border-top-left-radius: 2px; }
.wa-sender { display: block; font-size: 7px; color: #247164; font-weight: 500; margin-bottom: 3px; }
.wa-receipt { position: absolute; right: 4px; bottom: 4px; display: flex; color: #226e97; }
.wa-receipt .icon { width: 9px; height: 9px; stroke-width: 2; }
.wa-receipt .icon + .icon { margin-left: -5px; }
.whatsapp-typing { display: none; align-items: center; gap: 7px; color: #4e665c; }
.whatsapp-typing > span:last-child { font-size: 7px; }
.typing-dots { display: flex; gap: 3px; align-items: center; height: 22px; padding: 0 8px; background: #fff; border-radius: 7px; }
.typing-dots i { width: 3px; height: 3px; background: #7a8b82; border-radius: 50%; animation: chat-typing 950ms ease-in-out infinite; animation-play-state: var(--social-play); }
.typing-dots i:nth-child(2) { animation-delay: 140ms; }
.typing-dots i:nth-child(3) { animation-delay: 280ms; }
.hero-cinematic[data-chat-typing="true"] .whatsapp-typing { display: flex; }
.whatsapp-compose { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 8px 8px 14px; background: #f6f3ef; color: #536b5f; }
.whatsapp-compose > span { flex: 1; display: block; background: #fff; border-radius: 14px; padding: 5px 11px; font-size: 9px; color: #6e7c73; }
.whatsapp-compose .icon { width: 16px; height: 16px; }
.app-handoff { pointer-events: none; position: absolute; z-index: 6; left: calc(50% - 31px); top: 44%; width: 62px; height: 62px; display: grid; place-items: center; background: #138568; color: #fff; border-radius: 16px; box-shadow: 0 13px 25px #06261b40; opacity: 0; }
.app-handoff .icon { width: 37px; height: 37px; stroke-width: 1.35; }
.hero-cinematic[data-scene="1"] .social-instagram { transform: translateX(-30%) scale(.94); opacity: 0; pointer-events: none; }
.hero-cinematic[data-scene="1"] .social-whatsapp { transform: none; opacity: 1; visibility: visible; }
.hero-cinematic[data-scene="2"] .story-phone { opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(-15px) scale(.87); pointer-events: none; }
.hero-cinematic .story-workspace { opacity: 0; transform: translateY(-20px); border-radius: 12px 12px 0 0; }
.hero-cinematic:not([data-scene="2"]) .story-workspace { opacity: 0; transform: translateY(-20px); visibility: hidden; }
.hero-cinematic[data-scene="2"] .story-workspace { opacity: 1; transform: none; visibility: visible; }
.hero-cinematic .story-followup { bottom: 0; border-radius: 0 0 12px 12px; }
.hero-cinematic .story-example { opacity: 1; visibility: visible; background: transparent; color: #c6bacf; padding: 10px 4px 0; font-size: 9px; text-align: center; }
.hero-cinematic[data-scene="2"] .story-example { padding: 12px 24px; text-align: left; color: var(--story-muted); background: var(--story-paper); border-radius: 0 0 12px 12px; }
.hero-cinematic[data-motion="running"] .hero-story { --social-play: running; }
@keyframes chat-typing { 0%, 70%, 100% { transform: translateY(0); } 35% { transform: translateY(-2px); } }
@keyframes chat-message-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@media (min-width: 1500px) {
  .wa-bubble p { font-size: 11px; }
  .whatsapp-top strong { font-size: 12px; }
  .whatsapp-top div > span { font-size: 7px; }
  .whatsapp-origin strong { font-size: 10px; }
  .whatsapp-origin span { font-size: 8px; }
}
@media (max-width: 820px) {
  .hero-story { --story-height: 555px; }
  .hero-sequence { max-width: 560px; }
}
@media (max-width: 540px) {
  .hero-story { --story-height: 555px; }
  .story-phone { width: 254px; }
  .wa-bubble p { font-size: 11px; }
  .whatsapp-top strong { font-size: 12px; }
  .whatsapp-top div > span { font-size: 7px; }
  .whatsapp-origin strong { font-size: 10px; }
  .whatsapp-origin span { font-size: 7.5px; }
  .instagram-caption h2 { font-size: 19px; }
  .instagram-caption p { font-size: 9px; }
  .hero-cinematic .story-example { font-size: 8px; }
  .hero-cinematic .story-controls { gap: 10px; }
  .hero-cinematic .story-controls button { gap: 6px; font-size: 10px; }
}
@media (max-width: 360px) {
  .story-phone { width: 248px; }
  .hero-cinematic .story-controls button { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .instagram-film video { display: none; }
  .instagram-tap, .app-handoff, .whatsapp-typing { display: none; }
  .typing-dots i { animation: none; }
}
